Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
node: warn if cwd is inaccessible during bootstrap
  • Loading branch information
Fishrock123 committed Mar 27, 2017
commit f14c96fb31bb7363c2eb4ea653e215d73fe58b84
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