Skip to content

Commit

Permalink
return permissions error directly
Browse files Browse the repository at this point in the history
  • Loading branch information
rylandg committed Nov 11, 2017
1 parent 84e1610 commit f5a0f83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions cli-sdk/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,7 @@ const exceptionWrapper = function tryCatchWrapper(funcToWrap) {
await funcToWrap(options);
return 0;
} catch (err) {
if (err.code === 'EACCES') {
log.error(`Permission denied writing to path: ${err.path}`);
} else {
log.error(err.message);
}
log.error(err.message);
return 1;
}
};
Expand Down
2 changes: 1 addition & 1 deletion test/CLISpec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
steps:
- in: bn init -p /home/dockeruser/test/securedir
out: |-
bn: Permission denied writing to path: /home/dockeruser/test/securedir*
bn: EACCES: permission denied, unlink '/home/dockeruser/test/securedir/function.js'
exit: 1

- test: Superfluous output(bad-path)
Expand Down

0 comments on commit f5a0f83

Please sign in to comment.