cli: fix command prompt showing up on windows (#194946)

cli: fix wsl prompt up on windows machine

Fixes #190425 again
This commit is contained in:
Connor Peet
2023-10-06 09:09:47 -07:00
committed by GitHub
parent 95f948717b
commit e250c8066d
9 changed files with 80 additions and 43 deletions

View File

@@ -12,6 +12,7 @@ use crate::state::LauncherPaths;
use crate::tunnels::protocol::{HttpRequestParams, METHOD_CHALLENGE_ISSUE};
use crate::tunnels::socket_signal::CloseReason;
use crate::update_service::{Platform, Release, TargetKind, UpdateService};
use crate::util::command::new_tokio_command;
use crate::util::errors::{
wrap, AnyError, CodeError, MismatchedLaunchModeError, NoAttachedServerError,
};
@@ -1019,7 +1020,7 @@ where
};
}
let mut p = tokio::process::Command::new(&params.command);
let mut p = new_tokio_command(&params.command);
p.args(&params.args);
p.envs(&params.env);
p.stdin(pipe_if!(stdin.is_some()));
@@ -1060,7 +1061,7 @@ async fn handle_spawn_cli(
"requested to spawn cli {} with args {:?}", params.command, params.args
);
let mut p = tokio::process::Command::new(&params.command);
let mut p = new_tokio_command(&params.command);
p.args(&params.args);
// CLI args to spawn a server; contracted with clients that they should _not_ provide these.