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 BridgeAR committed Feb 16, 2018
1 parent 916cfec commit bd4350c
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 @@ -75,6 +75,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 bd4350c

Please sign in to comment.