afloyd / mongo-migrate

MIT License
159 stars 81 forks source link

Command line parsing buggy #7

Closed orbitbot closed 10 years ago

orbitbot commented 10 years ago

After an installation through npm, even basic functionality is not working for me:

$ node mongo-migrate -runmm create first-post

path.js:360
        throw new TypeError('Arguments to path.join must be strings');
              ^
TypeError: Arguments to path.join must be strings
    at path.js:360:15
    at Array.filter (native)
    at exports.join (path.js:358:36)
    at create (/home/patrik/tmp/node_modules/mongo-migrate/index.js:234:17)
    at commands.create (/home/patrik/tmp/node_modules/mongo-migrate/index.js:223:4)
    at runMongoMigrate (/home/patrik/tmp/node_modules/mongo-migrate/index.js:299:10)
    at Object.<anonymous> (/home/patrik/tmp/node_modules/mongo-migrate/index.js:351:2)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

... I've checked with the node-migration package, and the problem exists for me with that package as well.

afloyd commented 10 years ago

Didn't have cwd variable set, fixed with the following commit, and now in version 0.0.6. https://github.com/afloyd/mongo-migrate/commit/0026f56456579c7263b65fbc09a22633dc800c49

Thanks, Austin