fix(client): use cmd /D to disable AutoRun, prevents terminal clear on each command
This commit is contained in:
parent
18e844033a
commit
07d758a631
1 changed files with 3 additions and 1 deletions
|
|
@ -80,7 +80,9 @@ async fn spawn_cmd_windows(
|
|||
let full_cmd = format!("chcp 65001 >nul 2>&1 && {command}");
|
||||
|
||||
let mut cmd = Command::new("cmd.exe");
|
||||
cmd.args(["/C", &full_cmd]);
|
||||
// /D disables AutoRun registry commands (prevents user's `clear` or other
|
||||
// startup hooks from wiping the client's terminal output).
|
||||
cmd.args(["/D", "/C", &full_cmd]);
|
||||
|
||||
if let Some(ref dir) = cwd {
|
||||
cmd.current_dir(dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue