Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

Commit

Permalink
Properly error for missing sub commands
Browse files Browse the repository at this point in the history
  • Loading branch information
leo committed Feb 8, 2018
1 parent 7dde321 commit bf2d0ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bin/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ try {
require(`./${run}.js`)()
} catch (err) {
// Ensure missing modules from required files
// still lead to an error
if (!err.stack.includes('bin/index')) {
// still lead to an error. Don't use a slash
// in here, otherwise it breaks on Windows.
if (!err.stack.includes('index.js')) {
throw err
}

Expand Down

0 comments on commit bf2d0ea

Please sign in to comment.