espresso-sequencer icon indicating copy to clipboard operation
espresso-sequencer copied to clipboard

chore: fix some annoying Bash quirks

Open mdqst opened this issue 2 months ago • 0 comments

This PR:

  • Fixes a few Bash annoyances that were breaking the script sometimes:
    • --account-index check now properly handles empty vs number, older Bash hated the old version.
    • Docker flag check fixed (if [ "$docker" = true ]; then) so it doesn’t try to run “true” as a command.
    • Commands with spaces now work because cmd is an array.
    • Added a quick command -v cast check so the script won’t crash if cast isn’t installed.
    • Running commands now uses $("${cmd[@]}" ...) to handle spaces properly.

This PR does not:

  • Touch any features, just fixes how the script behaves in different Bash setups.
  • Change anything unrelated.

Key places to review:

  • Account index parsing
  • Docker flag handling
  • Anywhere cmd is used to run commands
  • Cast command usage

mdqst avatar Oct 06 '25 16:10 mdqst