Skip to content

Error in Linux installer script #1217

Closed
@devconsole

Description

@devconsole

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions