diff --git a/lib/internal/bootstrap_node.js b/lib/internal/bootstrap_node.js index f29f7a647a4bd3..f428f49cfa50e6 100644 --- a/lib/internal/bootstrap_node.js +++ b/lib/internal/bootstrap_node.js @@ -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?