Skip to content

Commit

Permalink
Merge pull request alexanderGugel#57 from mrmlnc/init-error-handler
Browse files Browse the repository at this point in the history
User-friendly error output when exiting from the initialization process
  • Loading branch information
alexanderGugel committed Jan 18, 2016
2 parents b2a5570 + 125f83e commit 9d64c8d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/init_cmd.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ var home = process.env[isWindows ? 'USERPROFILE' : 'HOME']
function initCmd (cwd, argv) {
var initFile = path.resolve(home, '.ied-init')
init(cwd, initFile, function (err, data) {
if (err) throw err
if (err && err.message === 'canceled') {
console.log('init canceled!')
return
}

throw err
})
}

Expand Down

0 comments on commit 9d64c8d

Please sign in to comment.