From d706b656432a9dd2ebc7d1deba9b2ccc7a81a989 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 7 Oct 2026 14:17:49 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E7=BC=BA=E5=AE=BF=E4=B8=BBNode?= =?UTF-8?q?=E7=9A=84npm=E7=9B=AE=E6=A0=87=E5=8D=95=E6=B5=8B=E5=8A=A0?= =?UTF-8?q?=E5=8F=AF=E8=A7=81=E8=B7=B3=E8=BF=87=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - npm_command_targets_node_plus_npm_cli_on_linux 跳过时 eprintln 输出原因(含 resolve_node_runtime 错误),配 --nocapture / --show-output 可与真实通过区分 --- apps/ai-game-creator-shell/src-tauri/src/command_exec.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/ai-game-creator-shell/src-tauri/src/command_exec.rs b/apps/ai-game-creator-shell/src-tauri/src/command_exec.rs index d648e10d8..d5a9582b5 100644 --- a/apps/ai-game-creator-shell/src-tauri/src/command_exec.rs +++ b/apps/ai-game-creator-shell/src-tauri/src/command_exec.rs @@ -2664,8 +2664,11 @@ mod tests { let root = tempfile::tempdir().unwrap(); std::fs::create_dir_all(root.path().join("game")).unwrap(); // 这条用例走真实 resolve_node_runtime:没有可用宿主 Node 的最小容器里跳过, - // 保持 cargo test 可跑;其它失败仍然照常失败。 - if crate::environment_check::resolve_node_runtime(root.path()).is_err() { + // 保持 cargo test 可跑;跳过时打印可见提示(配 --nocapture / --show-output 看得到)。 + if let Err(error) = crate::environment_check::resolve_node_runtime(root.path()) { + eprintln!( + "skipping npm_command_targets_node_plus_npm_cli_on_linux: no host node runtime({error})" + ); return; } let spec = resolve_project_command_spec_at(