yarnpkg / website

Yarn package manager website
https://classic.yarnpkg.com
432 stars 979 forks source link

yarn install script has issues when running in dash #1044

Open interone-ms opened 4 years ago

interone-ms commented 4 years ago

Bug description

When running the yarn install.sh script in a system set with dash as sh shell, there are errors during installation displayed, as the installation script uses bashisms.

Command

./install.sh

What is the current behavior?

install.sh outputs warnings:

install.sh: 52: [[: not found
install.sh: 57: [: unexpected operator
install.sh: 95: [[: not found

What is the expected behavior? The installer should run without warnings.

Steps to Reproduce

  1. curl -L -o install.sh https://yarnpkg.com/install.sh
  2. chmod +x install.sh && ./install.sh

Environment

Daniel15 commented 4 years ago

Would you like to submit a PR to fix this?