Skip to content
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 in Linux installer script #1217

Closed
devconsole opened this issue Jan 29, 2023 · 2 comments · Fixed by #1320
Closed

Error in Linux installer script #1217

devconsole opened this issue Jan 29, 2023 · 2 comments · Fixed by #1320

Comments

@devconsole
Copy link

🐛 Bug description

When running the installer in a terminal under Ubuntu 22.04.1 LTS, the following error gets printed:
sh: 139: [: x86_64: unexpected operator

🤔 Expected Behavior

No error message

👟 Steps to reproduce

curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

🌍 Your environment

Ubuntu 22.04.1 LTS

Line 139 reads:
if [ "$_cputype" == "aarch64" ] && [ "$_ostype" == "apple-darwin" ]; then

I think this would work instead (similar to the statement in line 101):
if [ "$_cputype" = "aarch64" -a "$_ostype" = "apple-darwin" ]; then

@jimmyrosiee
Copy link

i also coudn't install wasm-pack using this shell script, so i installed it using cargo

cargo install wasm-pack

@socketbox
Copy link

Duplicate of #1159

lucashorward added a commit to lucashorward/wasm-pack that referenced this issue Aug 7, 2023
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants