Review round 1 for the Node build module: build depth (1490), bin scripts for the test script (1491), toolchain.reported and its stream (1483, 1488); delta part 3 of 4

This commit is contained in:
2026-10-20 21:10:18 +00:00
parent 7e7cc27c30
commit 4a1804cda3
6 changed files with 164 additions and 15 deletions
@@ -148,7 +148,7 @@ func (m *Module) test(ctx context.Context, args map[string]any) (any, error) {
}
if hasScript && len(failed) == 0 {
start := m.now()
env := []string{"npm_config_cache=" + filepath.Join(m.Toolchain.Paths.Cache, "npm")}
env := []string{"PATH=" + binDir(root) + ":" + pathOrDefault(), "npm_config_cache=" + filepath.Join(m.Toolchain.Paths.Cache, "npm")}
r := m.runIn(ctx, dir, env, "npm", scriptArgs(script)...)
run = m.now().Sub(start)
if err := ran(script, r); err != nil {