Skip to content

Commit

Permalink
Adapt fixing base dir for modules to rebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorn0 committed Sep 20, 2023
1 parent d30991e commit d2afb9d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions rebuild.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,11 @@ const modulesToBuild = modules
.filter(mod => mod.targetPlatform === platform() && mod.targetArch === arch())
.map(module => {
// Base dir might have changed between runs
const moduleName = module.name;
module.module.baseDir = `${ROOT_DIR}/${moduleName}`;
const oldBaseDir = module.baseDir;
const reg = new RegExp('.+/native-deps-buildkit/node_modules')
const fixedBaseDir = oldBaseDir.replace(reg, `${ROOT_DIR}/node_modules`)
log('--> using new baseDir: %o', fixedBaseDir);
module.module.baseDir = fixedBaseDir;
return module;
});

Expand Down

0 comments on commit d2afb9d

Please sign in to comment.