From a42f37f623c2f54328d1c908a14035328e45a6ce Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Wed, 20 Sep 2023 14:57:51 +0200 Subject: [PATCH] Fix regexp --- .github/workflows/macos-intel-build-prebuilds.yml | 2 +- rebuild.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/macos-intel-build-prebuilds.yml b/.github/workflows/macos-intel-build-prebuilds.yml index 8ac0db0..1ee4268 100644 --- a/.github/workflows/macos-intel-build-prebuilds.yml +++ b/.github/workflows/macos-intel-build-prebuilds.yml @@ -37,6 +37,6 @@ jobs: name: modulesToBuildForElectron # Openssl3 and krb5 are already installed on Github host Mac OS runners - name: Install toolkit - run: npm install --no-optional + run: npm install --omit=optional - name: Build native modules on Mac OS x64 run: npm run rebuild-custom-for-target diff --git a/rebuild.js b/rebuild.js index 53791b8..df7b674 100644 --- a/rebuild.js +++ b/rebuild.js @@ -17,8 +17,8 @@ const modulesToBuild = modules .map(module => { // Base dir might have changed between runs const oldBaseDir = module.baseDir; - const reg = new RegExp('.+/native-deps-buildkit/node_modules') - const fixedBaseDir = oldBaseDir.replace(reg, `${ROOT_DIR}/node_modules`) + const reg = new RegExp('.+/native-deps-buildkit/node_modules', 'gi') + const fixedBaseDir = oldBaseDir.replaceAll(reg, `${ROOT_DIR}/node_modules`) log('--> using new baseDir: %o', fixedBaseDir); module.module.baseDir = fixedBaseDir; return module;