fix(client): use cmd /D to disable AutoRun, prevents terminal clear on each command

This commit is contained in:
Helios Agent 2026-03-03 14:51:31 +01:00
parent 18e844033a
commit 07d758a631
No known key found for this signature in database
GPG key ID: C8259547CD8309B5

View file

@ -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);