afloyd / mongo-migrate

MIT License
159 stars 81 forks source link

Always read cwd from process.cwd() so that it is always an absolute path... #17

Closed jbrechtel closed 9 years ago

jbrechtel commented 10 years ago

When using -c to change the current directory you'll often want to use a relative path for the new directory. A relative path will break loading the config file when using that in the require() line (on 246 in the original code). If instead the cwd is already read from process then you'll always get an absolute path and require() will work.

nkcraddock commented 9 years ago

+1

thomdixon commented 9 years ago

@afloyd can we get this merged? Thanks!