Skip to content

Commit

Permalink
fix: non-pg error not handled properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Coe committed Sep 24, 2016
1 parent 5c729f8 commit b12a26e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion createdb.js
Expand Up @@ -14,7 +14,7 @@ createdb({

function die (err, argv) {
if (err) {
if (!argv.silent) console.log(err.pgErr.toString());
if (!argv.silent) console.log(err.pgErr ? err.pgErr.toString() : err.toString());
process.exit(-1);
}
}
2 changes: 1 addition & 1 deletion dropdb.js
Expand Up @@ -14,7 +14,7 @@ dropdb({

function die (err, argv) {
if (err) {
if (!argv.silent) console.log(err.pgErr.toString());
if (!argv.silent) console.log(err.pgErr ? err.pgErr.toString() : err.toString());
process.exit(-1);
}
}

0 comments on commit b12a26e

Please sign in to comment.