espresso-sequencer
espresso-sequencer copied to clipboard
chore: fix some annoying Bash quirks
This PR:
- Fixes a few Bash annoyances that were breaking the script sometimes:
--account-indexcheck 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
cmdis an array. - Added a quick
command -v castcheck 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
cmdis used to run commands - Cast command usage