yarnpkg/yarn

yarn run [script] [-- <args>] is broken

develar opened this issue · 1 comments

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

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

Create file foo.js:

console.log(process.argv)

and package.json:

{
  "name": "untitled5",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "scripts": {
    "foo": "node foo.js"
  }
}

What is the expected behavior?

develar-imac:untitled5 develar$ npm run foo -- --hello

> untitled5@1.0.0 foo /Users/develar/Documents/untitled5
> node foo.js "--hello"

[ '/usr/local/Cellar/node/7.0.0/bin/node',
  '/Users/develar/Documents/untitled5/foo.js',
  '--hello' ]
develar-imac:untitled5 develar$ yarn run foo -- --hello
yarn run v0.17.0-20161109.0548
$ node foo.js
[ '/usr/local/Cellar/node/7.0.0/bin/node',
  '/Users/develar/Documents/untitled5/foo.js' ]
✨  Done in 0.09s.

yarn doesn't pass --hello arg to script.

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

yarn: 0.17.0-20161109.0548
node: v7.0.0
os: macOS 16.1.0

Checked — it works in the released 0.1.6.1 and broken in the nightly 0.17