address feedback

This commit is contained in:
Chris Tate
2026-01-12 10:25:20 -06:00
parent 70ae6e34dc
commit c30aa73e17
2 changed files with 8 additions and 6 deletions
+5 -4
View File
@@ -206,12 +206,13 @@ pub fn ensure_daemon(session: &str, headed: bool) -> Result<(), String> {
{
use std::os::windows::process::CommandExt;
// On Windows, use cmd.exe to run node to ensure proper PATH resolution
// This handles cases where node.exe isn't directly in PATH but node.cmd is
// On Windows, use cmd.exe to run node to ensure proper PATH resolution.
// This handles cases where node.exe isn't directly in PATH but node.cmd is.
// Pass the entire command as a single string to /c to handle paths with spaces.
let cmd_string = format!("node \"{}\"", daemon_path.display());
let mut cmd = Command::new("cmd");
cmd.arg("/c")
.arg("node")
.arg(daemon_path)
.arg(&cmd_string)
.env("AGENT_BROWSER_DAEMON", "1")
.env("AGENT_BROWSER_SESSION", session);
+3 -2
View File
@@ -130,10 +130,11 @@ pub fn run_install(with_deps: bool) {
println!("\x1b[36mInstalling Chromium browser...\x1b[0m");
// On Windows, we need to use cmd.exe to run npx because npx is actually npx.cmd
// and Command::new() doesn't resolve .cmd files the way the shell does
// and Command::new() doesn't resolve .cmd files the way the shell does.
// Pass the entire command as a single string to /c to handle paths with spaces.
#[cfg(windows)]
let status = Command::new("cmd")
.args(["/c", "npx", "playwright", "install", "chromium"])
.args(["/c", "npx playwright install chromium"])
.status();
#[cfg(not(windows))]