-
Notifications
You must be signed in to change notification settings - Fork 409
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error message in init.sh due to using == instead of = in an if
#1283
Comments
if
Since
Alternatively |
The existing version has "#!/bin/bash" but the double equals is the only bashism I saw, so I agree that switching the instructions to use bash in the pipe will work fine, but moving the shebang to /bin/sh and fixing the double equals seems like the best way to maintain maximum portability, I'd think. |
|
- Fixed error on line 139 - "==" was being used, whereas sh expects a "=" (and we do this correctly throughout the rest of the file). See https://www.shellcheck.net/wiki/SC3014 for more. - Changed the use of backticks to the use of `$()` as specified in https://www.shellcheck.net/wiki/SC2006 - Changed the use of `-a` to `&&` as specified in https://www.shellcheck.net/wiki/SC2166 Closes rustwasm#1159 Closes rustwasm#1217 Closes rustwasm#1283
🐛 Bug description
Running the install (init.sh), it printed an error message ("sh: 139: [: x86_64: unexpected operator"). The error message is caused because
==
is used instead of=
in theif
on line 139 of init.sh.🤔 Expected Behavior
No error message from the if comparison.
👟 Steps to reproduce
Here's my fix:
🌍 Your environment
I'm running on Pop!_OS 20.04 LTS on an x86 laptop. The bash version is "5.0.17(1)-release".
wasm-pack version: wasm-pack 0.11.0. The error is present in master (48177dc) as well.
rustc version: rustc 1.68.1 (8460ca823 2023-03-20)
The text was updated successfully, but these errors were encountered: