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:
parent
916cfeca77
commit
bd4350ca08
7
lib/internal/bootstrap_node.js
vendored
7
lib/internal/bootstrap_node.js
vendored
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user