Skip to content

Commit

Permalink
node: warn if cwd is inaccessible during bootstrap
Browse files Browse the repository at this point in the history
  • Loading branch information
Fishrock123 committed Mar 27, 2017
1 parent a8a042a commit f14c96f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/internal/bootstrap_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,9 @@
threw = false;
} finally {
if (threw) {
process.emitWarning('The current working directory was inaccessible.' +
'\nFalling back to the executable\'s directory.',
'BootstrapInaccessibleCwdWarning');
// getcwd(3) can fail if the current working directory has been deleted.
// Fall back to the directory name of the (absolute) executable path.
// It's not really correct but what are the alternatives?
Expand Down

0 comments on commit f14c96f

Please sign in to comment.