Skip to content

Commit

Permalink
Return promise from programRun
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksandr Lebedynskyi committed Jul 1, 2015
1 parent 1cf97d2 commit d829b86
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ var checkUpdates = require('npm-check-updates');
checkUpdates.run({
upgrade: true, // see available options above
force: true
}).then(function() {
console.log('done upgrading dependencies');
});
```

Expand Down
6 changes: 2 additions & 4 deletions lib/npm-check-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,7 @@ function programInit() {

function programRun() {
programInit();
options.global ?
programRunGlobal() :
programRunLocal()
return options.global ? programRunGlobal() : programRunLocal();
}

function programRunGlobal() {
Expand Down Expand Up @@ -201,6 +199,6 @@ module.exports = {
options = opts || {};
options.args = options.args || [];

vm.initialize(options.global).then(programRun);
return vm.initialize(options.global).then(programRun);
}
};

0 comments on commit d829b86

Please sign in to comment.