M3 Integration fixes pass 20

This commit is contained in:
Mark Gregory
2026-09-22 14:57:53 +01:00
parent c878d4e49a
commit 56954d7a33
3 changed files with 14 additions and 6 deletions
+10 -3
View File
@@ -1,8 +1,13 @@
import fs from 'node:fs';
import path from 'node:path';
import { execSync } from 'node:child_process';
import { execFileSync } from 'node:child_process';
const modulesDir = path.resolve('Modules');
const npmCli = process.env.npm_execpath;
if (!npmCli || !path.isAbsolute(npmCli) || !fs.existsSync(npmCli)) {
throw new Error('npm_execpath must reference an existing absolute npm CLI path.');
}
for (const moduleName of fs.readdirSync(modulesDir)) {
@@ -23,11 +28,13 @@ for (const moduleName of fs.readdirSync(modulesDir)) {
console.log(`Building ${moduleName}`);
try {
execSync(
'npm run build',
execFileSync(
process.execPath,
[npmCli, 'run', 'build'],
{
cwd: modulePath,
stdio: 'inherit',
env: { ...process.env, PATH: '/usr/bin:/bin' },
}
);
} catch (error) {