flexxnn / sequelize-auto-migrations

Migration generator && runner for sequelize
MIT License
259 stars 166 forks source link

process.env.PWD not run on windows #8

Open welberty opened 6 years ago

welberty commented 6 years ago

Change 'process.env.PWD' to 'process.env.PWD || process.cwd()' on runmigration.js and makemigration.js to fix problem

didac-wh commented 6 years ago

My workaround was to add the env var when calling the program through cmd: set PWD=C:\Users\[Whatever_path]&& node .\node_modules\sequelize-auto-migrations\bin\makemigration --name test

Note that there's no space between the path and the "&&". That's important

Not the ideal solution, but it lets you avoid editing the lib code