cliffano / nestor

Jenkins CLI and node.js client
http://blog.cliffano.com/tag/nestor/
MIT License
182 stars 27 forks source link

No rule called notEmpty #29

Closed sthaha closed 10 years ago

sthaha commented 10 years ago

It seems validator has removed all the negative validators - notNull and notEmpty so a command like nestor console job_name fails with the following error:


~/.nvm/v0.10.30/lib/node_modules/nestor/node_modules/bagofcli/lib/bagofcli.js:112
      if (validator[rule](arg) === false) {
                         ^
TypeError: Property 'notEmpty' of object  is not a function
    at ~/.nvm/v0.10.30/lib/node_modules/nestor/node_modules/bagofcli/lib/bagofcli.js:112:26
    at Array.forEach (native)
    at _postCommand (~/.nvm/v0.10.30/lib/node_modules/nestor/node_modules/bagofcli/lib/bagofcli.js:151:34)
    at Object.command (~/.nvm/v0.10.30/lib/node_modules/nestor/node_modules/bagofcli/lib/bagofcli.js:68:3)
    at Object.exec (~/.nvm/v0.10.30/lib/node_modules/nestor/lib/cli.js:311:7)
    at Object.<anonymous> (~/.nvm/v0.10.30/lib/node_modules/nestor/bin/nestor:4:5)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)
    at Function.Module._load (module.js:312:12)
cliffano commented 10 years ago

Thanks for reporting this, I will fix bagofcli. On Nestor's end, I will add some integration tests for some commands.

marblegravy commented 10 years ago

Just confirming that the fix you made to bagofcli at https://github.com/cliffano/bagofcli/issues/6 does resolve this issue. Thanks!

sthaha commented 10 years ago

I have also verified that your fix resolves the issue. @cliffano thank you.

cliffano commented 10 years ago

Thanks again @sthaha for reporting the error, and @marblegravy for taking the time to confirm. Much appreciated, folks :). +1 for community