Skip to content

Commit

Permalink
fix(dependencies): Exit if dependencies are updated
Browse files Browse the repository at this point in the history
closes #21
  • Loading branch information
trevorgerhardt committed Jun 28, 2016
1 parent dae42a6 commit 25cf9e9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion bin/mastarm
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,16 @@ commander
commander.parse(process.argv)

if (!commander.skipCheckDependencies) {
const results = checkDependencies.sync({install: true})
const results = checkDependencies.sync({
install: true,
packageDir: process.cwd()
})
if (results.status !== 0) {
console.error(results.error)
process.exit(results.status)
} else if (!results.depsWereOk) {
console.log('Updated out of date dependencies found in package.json. Please try running the command again.')
process.exit(results.status)
}
}

Expand Down

0 comments on commit 25cf9e9

Please sign in to comment.