Skip to content

Commit 1557d93

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 7e75a78 commit 1557d93

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
@@ -73,6 +73,13 @@
7373
// URL::ToObject() method is used.
7474
NativeModule.require('internal/url');
7575

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

0 commit comments

Comments
 (0)