`yarn install -force` succeeds ignorning `-force`. Should be `--force`
Bug report
What is the current behavior?
yarn install -force doesn't output an error message about an invalid argument. It should be yarn install --force with two - characters.
$ yarn install -force
yarn install v1.1.0
[1/4] Resolving packages...
success Already up-to-date.
Done in 0.36s.
Compare with the desired:
$ yarn install --force
yarn install v1.1.0
[1/4] Resolving packages...
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
[4/4] Rebuilding all packages...
success Saved lockfile.
Done in 3.48s.
$
What is the expected behavior? An error message such as:
yarn: unrecognised command line argument "-force". See `yarn help install`
Versions
$ node --version
v8.5.0
$ yarn --version
1.1.0
$ uname -a
Linux svelte 4.9.51-1-MANJARO #1 SMP PREEMPT Wed Sep 20 10:37:40 UTC 2017 x86_64 GNU/Linux
Will try to create a pull request that fixes this and submit next week.
Is it really suposed to output a error message ?
seems like it should be at least a warning, the flag does nothing without two dashes.
Closing as fixed in v2, where flags are validated much more carefully.
https://yarnpkg.com/getting-started/migration