Running it with SH instead of BASH breaks it
lucasmontec opened this issue · 3 comments
lucasmontec commented
Since the syntax expects bash, you could add a check to prevent users trying to run with sh.
I got an error with sh because comparisons for sh are done with =
not ==
, and a bad substitution error here UPSTREAM_ID=${ID_LIKE,,}
.
This seems to be syntax explicitly for bash.
I have added this to mine so I remember to run it correctly:
# Check if the script is being run with bash
if [ -z "$BASH_VERSION" ]; then
echo "Error: This script must be run with bash, not sh."
exit 1
fi
dinger1986 commented
Good idea.
Do you want to PR a change?
lucasmontec commented
I'm a bit on a rush but I can send something later.
…On Tue, Jun 4, 2024 at 4:58 PM dinger1986 ***@***.***> wrote:
Good idea.
Do you want to PR a change?
—
Reply to this email directly, view it on GitHub
<#75 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAKRX7MFLTTA7PZVHKHP2R3ZFYL6FAVCNFSM6AAAAABIZCUVYCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGMYTMOBZG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
---
Lucas Montenegro Carvalhaes
Rogue Developer - Sawce <http://www.sawcegames.com>
*May the sawce be with you*
dinger1986 commented
Yea of course. I'll close this and wait for you to do the PR 👍