Skip to content

A repo demonstrating an issue with arguments being lost when send through npm scripts

Notifications You must be signed in to change notification settings

sidouglas/stackoverflow-node-arguments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command line arguments not working in OSX

From the terminal run: node ./scaffold/index.js --name=whatever

Outputs:

  '--name=whatever' ] { name: 'whatever',
  argv: 
   { remain: [],
     cooked: [ '--name', 'whatever' ],
     original: [ '--name=whatever' ] } } 'whatever'

Contrast this with:

npm run scaffold --name=whatever

Outputs:

 '/usr/local/bin/node',
  '/Users/simon/Desktop/stackoverflow/scaffold/index.js',
  '--' ] { argv: { remain: [], cooked: [ '--' ], original: [ '--' ] } } undefined

About

A repo demonstrating an issue with arguments being lost when send through npm scripts

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published