Skip to content

Commit

Permalink
lib: set process.execPath on OpenBSD
Browse files Browse the repository at this point in the history
PR-URL: #18543
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
qbit authored and MylesBorins committed Feb 21, 2018
1 parent 7e75a78 commit 1557d93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/internal/bootstrap_node.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,13 @@
// URL::ToObject() method is used.
NativeModule.require('internal/url');

// On OpenBSD process.execPath will be relative unless we
// get the full path before process.execPath is used.
if (process.platform === 'openbsd') {
const { realpathSync } = NativeModule.require('fs');
process.execPath = realpathSync.native(process.execPath);
}

Object.defineProperty(process, 'argv0', {
enumerable: true,
configurable: false,
Expand Down

0 comments on commit 1557d93

Please sign in to comment.