summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2019-02-08 09:04:07 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2019-02-12 10:26:38 +0800
commitaf83f6af5daf5b91f790cb6b9bf61f1ca566ccd0 (patch)
tree88244e3760b72364eb0acb68775c77780561ac18 /lib
parent9e84a26cb3d390a6ce051b75c892094fff233f92 (diff)
downloadandroid-node-v8-af83f6af5daf5b91f790cb6b9bf61f1ca566ccd0.tar.gz
android-node-v8-af83f6af5daf5b91f790cb6b9bf61f1ca566ccd0.tar.bz2
android-node-v8-af83f6af5daf5b91f790cb6b9bf61f1ca566ccd0.zip
process: normalize process.execPath in CreateProcessObject()
Directly normalize `process.execPath` using `uv_fs_realpath` on OpenBSD before serializing it into the process object, instead of using `require('fs')` to normalize and override the path in `bootstrap/node.js`. PR-URL: https://github.com/nodejs/node/pull/26002 Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Minwoo Jung <minwoo@nodesource.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/internal/bootstrap/node.js7
1 files changed, 0 insertions, 7 deletions
diff --git a/lib/internal/bootstrap/node.js b/lib/internal/bootstrap/node.js
index 2585fff206..afb6340570 100644
--- a/lib/internal/bootstrap/node.js
+++ b/lib/internal/bootstrap/node.js
@@ -187,13 +187,6 @@ if (browserGlobals) {
setupDOMException();
-// 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,