Skip to content

Commit 77a405b

Browse files
qbitMylesBorins
authored andcommittedApr 13, 2018
lib: set process.execPath on OpenBSD
PR-URL: #18543 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 057c80b commit 77a405b

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
@@ -66,6 +66,13 @@
6666
// URL::ToObject() method is used.
6767
NativeModule.require('internal/url');
6868

69+
// On OpenBSD process.execPath will be relative unless we
70+
// get the full path before process.execPath is used.
71+
if (process.platform === 'openbsd') {
72+
const { realpathSync } = NativeModule.require('fs');
73+
process.execPath = realpathSync.native(process.execPath);
74+
}
75+
6976
Object.defineProperty(process, 'argv0', {
7077
enumerable: true,
7178
configurable: false,

0 commit comments

Comments
 (0)