From 042463fffb35a52ad340089278a3b628920ef5c9 Mon Sep 17 00:00:00 2001 From: Greg Magolan Date: Tue, 11 Dec 2018 16:52:03 -0800 Subject: [PATCH] build(bazel): fix postinstall-patches.js script run during yarn postinstall when running yarn_install (#27610) PR Close #27610 --- package.json | 2 +- tools/postinstall-patches.js | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index fe52628307..6647051edc 100644 --- a/package.json +++ b/package.json @@ -20,7 +20,7 @@ "bazel:lint": "yarn bazel:format --lint=warn", "bazel:lint-fix": "yarn bazel:format --lint=fix", "preinstall": "node tools/yarn/check-yarn.js", - "postinstall": "yarn update-webdriver && node ./tools/postinstall-patches.js", + "postinstall": "yarn update-webdriver && node --preserve-symlinks --preserve-symlinks-main ./tools/postinstall-patches.js", "update-webdriver": "webdriver-manager update --gecko false $CHROMEDRIVER_VERSION_ARG", "check-env": "gulp check-env", "commitmsg": "node ./scripts/git/commit-msg.js", diff --git a/tools/postinstall-patches.js b/tools/postinstall-patches.js index 68cb13623d..a85b574462 100644 --- a/tools/postinstall-patches.js +++ b/tools/postinstall-patches.js @@ -15,7 +15,8 @@ try { // This can be fixed using the --preserve-symlinks-main flag which // is introduced in node 10.2.0 console.warn( - 'Running postinstall-patches.js script in an external repository requires --preserve-symlinks-main node flag introduced in node 10.2.0'); + `Running postinstall-patches.js script in an external repository requires --preserve-symlinks-main node flag introduced in node 10.2.0. ` + + `Current node version is ${process.version}. Node called with '${process.argv.join(" ")}'.`); process.exit(0); }