Skip to content

Commit 6b2bf66

Browse files
committed
[DDW-1083] Remove all prebuilt *.node files extracted from .tgzs
1 parent 095d0c3 commit 6b2bf66

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

nix/any-darwin.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ in rec {
7272
7373
# Now, install from ${offlineCache} to node_modules/
7474
yarn install --ignore-scripts
75-
# TODO: remove all prebuilt *.node files extracted from `.tgz`s
75+
76+
# Remove all prebuilt *.node files extracted from `.tgz`s
77+
find . -type f -name '*.node' -not -path '*/@swc*/*' -exec rm -vf {} ';'
7678
7779
patchShebangs . >/dev/null # a real lot of paths to patch, no need to litter logs
7880
sed -r 's#/bin/sh#sh#' -i node_modules/lzma-native/node_modules/node-gyp-build/bin.js

nix/x86_64-linux.nix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ in rec {
5252
# its dependencies we need to `patchShebangs` first, since even
5353
# ‘/usr/bin/env’ is not available in the build sandbox
5454
yarn install --ignore-scripts
55-
# TODO: remove all prebuilt *.node files extracted from `.tgz`s
55+
56+
# Remove all prebuilt *.node files extracted from `.tgz`s
57+
find . -type f -name '*.node' -not -path '*/@swc*/*' -exec rm -vf {} ';'
5658
5759
patchShebangs . >/dev/null # a real lot of paths to patch, no need to litter logs
5860
sed -r 's#/bin/sh#sh#' -i node_modules/lzma-native/node_modules/node-gyp-build/bin.js

scripts/rebuild-native-modules.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ set -o pipefail
1010
chmod -R +w node_modules/
1111

1212
echo 'Deleting all current ‘*.node’ files before rebuilding for Electron’s ABI:'
13-
find . -type f -name '*.node' -not -path '*/prebuilds/*' -not -path '*/@swc*/*' -exec rm -vf {} ';'
13+
find . -type f -name '*.node' -not -path '*/@swc*/*' -exec rm -vf {} ';'
1414

1515
# Let’s patch electron-rebuild to force correct Node.js headers to
1616
# build native modules against even in `nix-shell`, otherwise, it

0 commit comments

Comments
 (0)