Skip to content

Commit 9129bc4

Browse files
qbitMylesBorins
authored andcommitted
lib: set process.execPath on OpenBSD
PR-URL: #18543 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent f4ddaae commit 9129bc4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

lib/internal/bootstrap_node.js

+7
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@
7171
// URL::ToObject() method is used.
7272
NativeModule.require('internal/url');
7373

74+
// On OpenBSD process.execPath will be relative unless we
75+
// get the full path before process.execPath is used.
76+
if (process.platform === 'openbsd') {
77+
const { realpathSync } = NativeModule.require('fs');
78+
process.execPath = realpathSync.native(process.execPath);
79+
}
80+
7481
Object.defineProperty(process, 'argv0', {
7582
enumerable: true,
7683
configurable: false,

0 commit comments

Comments
 (0)