mongo-migrate
mongo-migrate copied to clipboard
Bin do not work because of windows line ending format
Mongo-migrate version located on npm contains cariage returns:
#!/usr/bin/env node^M¬
2 ^M¬
3 require('../index.js');^M¬
And this is the reason why bin/mongo-migrate.js doesn't work on linux and mac os (do not know about winsows).
And this is why you suggest to use:
node ./node_modules/mongodb-migrate -runmm create
Insteed of:
mongodb-migrate -runmm create
Could you please fix version on npm (you could use dos2unix for this purpose) and create alias with same bin name as npm-package called: mongodb-migrate.
Have just encountered this issue on Mac. The solution is simple:
brew install dos2unix
dos2unix ./node_modules/mongodb-migrate/bin/mongo-migrate.js
However, it won't let me create a Pull Request because git doesn't see it as a change in the repo.
Therefore, until it's fixed, i'm resorting to ./node_modules/.bin/mongo-migrate instead of mongo-migrate to be cross platform.