yarnpkg/yarn

Yarn ignores invalid command line arguments

Open

#2,600 建立於 2017年1月31日

在 GitHub 查看
 (4 留言) (8 反應) (0 負責人)JavaScript (41,514 star) (2,731 fork)batch import
cat-featuregood first issuehelp wantedhigh-prioritytriaged

描述

Do you want to request a feature or report a bug?

A bug.

What is the current behavior?

$ yarn install --parsing-command-line-arguments-is-hard
yarn install v0.19.1
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
[...]
Done in 12.71s.

If the current behavior is a bug, please provide the steps to reproduce.

yarn silently ignores unknown command line arguments. That's a usability problem, i.e. when users mistype an argument, the command silently proceeds but then fails to behave as expected, leaving a puzzled user. Combined with potentially dangerous arguments, this can be a bigger problem. Imagine installing an untrusted package that you'd like to inspect for security reasons, but misstyping --ignore-scripts.

What is the expected behavior?

$ yarn install --fried-chicken
yarn install v0.19.1
error Unknown argument "--fried-chicken".

Please mention your node.js, yarn and operating system version.

Node v5.3.0, Ubuntu.

貢獻者指南