mgol / grunt-check-dependencies

Checks if currently installed npm dependencies are installed in the exact same versions that are specified in package.json
MIT License
15 stars 6 forks source link

continue option does not work #13

Closed alelau closed 8 years ago

alelau commented 8 years ago

Hi ,

according the documentation in npmjs

// If true, instead of aborting the task after checking (and installing), the task will continue. // Default: false. continue: boolean, i configured the option, but the task is anyway aborted. At the same time I wouldn't use --force.

Regards

mgol commented 8 years ago

That's weird as I have a test ensuring that it works: https://github.com/mgol/grunt-check-dependencies/blob/b1765defd765f98e1c366fd1a539650b184774d2/test/spec.js#L58-L81. What version of grunt-check-dependencies & check-dependencies? Could you post the output?

alelau commented 8 years ago

"name": "grunt-check-dependencies", "version": "0.11.2" "name": "check-dependencies", "version": "0.10.3",

output: Running "checkDependencies:default" (checkDependencies) task

grunt-commands: installed: 0.1.8, expected: 0.1.7 Invoke npm install to install missing packages Warning: Task "checkDependencies:default" failed. Use --force to continue.

gruntfile.js configuration

checkDependencies: { default: { options: { checkGitUrls: true, continue:true } }, bower: { options: { packageManager: 'bower', checkGitUrls: true, install: true } } },

mgol commented 8 years ago

You need to have the install option enabled as well, not only continue. continue only means that if dependencies were incorrect but were successfully fixed by the task, the task doesn't end with an error.

Perhaps I should add an error message that would make it more obvious.

mgol commented 8 years ago

The error landed in 3c93e0b25a6d95585d4234c6b784732b2dd53f53. I also renamed continue to continueAfterInstall to reduce confusion. The continue variant is now deprecated; for now it works but triggers a warning.

mgol commented 8 years ago

Published as 0.12.0.