Skip to content

Commit

Permalink
Error if no password could be found
Browse files Browse the repository at this point in the history
  • Loading branch information
kevva committed Feb 18, 2015
1 parent 2930629 commit ceefc42
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ function getPassword(name, cb) {
ret = ret && ret.length ? ret[1] : null;
}

if (!ret) {
cb(new Error('Could not get password'));
return;
}

cb(null, ret);
});
}
Expand Down

0 comments on commit ceefc42

Please sign in to comment.