From 10fc638e249fa1ceb38daaeca85ff20739ebf44c Mon Sep 17 00:00:00 2001 From: BFlat Date: Wed, 4 Nov 2026 10:57:42 +0700 Subject: [PATCH] The Node.js tests check uses its stand-in program on Windows too (#783) The Node.js tests check's test clears the toolchain's Windows program name, so on Windows it runs its stand-in instead of the real npm. Test only. --- crates/ai/src/rebuild/check.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/ai/src/rebuild/check.rs b/crates/ai/src/rebuild/check.rs index c7537a72..6046a1b4 100644 --- a/crates/ai/src/rebuild/check.rs +++ b/crates/ai/src/rebuild/check.rs @@ -308,7 +308,8 @@ mod tests { let (d, stop) = (tempfile::tempdir().unwrap(), CancelToken::default()); std::fs::write(d.path().join("package.json"), "").unwrap(); let table = stacks::toolchain_in(d.path()).expect("the table has Node.js"); - let node = stacks::Toolchain { test: vec!["no-such-program-here".into()], ..table.clone() }; + // Without the Windows name (npm.cmd), which would start the real npm instead of the stand-in. + let node = stacks::Toolchain { test: vec!["no-such-program-here".into()], windows_program: None, ..table.clone() }; for json in [r#"{"name":"x"}"#, r#"{"scripts":{"test":"echo \"Error: no test specified\" && exit 1"}}"#] { std::fs::write(d.path().join("package.json"), json).unwrap(); let (passed, note) = own_tests_check(d.path(), Some(&node), &stop);