mirror of
https://github.com/nodejs/node.git
synced 2026-11-24 21:50:36 -05:00
lib: set process.execPath on OpenBSD
PR-URL: https://github.com/nodejs/node/pull/18543 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
1 parent
f4ddaaec0e
commit
9129bc4fde
1 file changed
+7
Vendored
+7
@@ -71,6 +71,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,
|
||||
|
||||
Reference in new issue
Block a user