reactioncommerce / migrator

Command line interface for migrating MongoDB databases
Apache License 2.0
4 stars 5 forks source link

cli shebang fails on linux due to varying env features #1

Closed focusaurus closed 4 years ago

focusaurus commented 4 years ago

macos the shebang we are using to run node with arguments works OK, but on linux it fails because /usr/bin/env doesn't handle parsing on whitespace and running an executable with command line arguments.

./node_modules/.bin/migrator migrate                                              
/usr/bin/env: 'node --no-warnings --experimental-modules --experimental-json-modules': No such file or directory

This is discussed a bunch on stackoverflow. I think we'll need to write a wrapper script with a regular shebang that execs node with arguments.

focusaurus commented 4 years ago

To workaround you should be able to run the command this way:

node --no-warnings --experimental-modules --experimental-json-modules ./node_modules/.bin/migrator migrate
aldeed commented 4 years ago

@focusaurus PR with potential fix: https://github.com/reactioncommerce/migrator/pull/2

I don't have my linux laptop with me, so I haven't tested it but it works the same on Mac.

rc-publisher commented 4 years ago

:tada: This issue has been resolved in version 1.0.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: