Skip to content

Commit fa67ff1

Browse files
pacmancoderCBenoit
authored andcommitted
fix(agent): suppress ANSI escape codes in pwsh output
1 parent bb50b6a commit fa67ff1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

devolutions-session/src/dvc/task.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,11 @@ impl MessageProcessor {
639639
self.ensure_session_id_free(winps_msg.session_id()).await?;
640640

641641
let tmp_file = TmpFileGuard::new("ps1")?;
642-
tmp_file.write_content(winps_msg.command())?;
642+
643+
// Suppress ANSI escape codes in pwsh output.
644+
let mut script = "$PSStyle.OutputRendering = 'PlainText';\n".to_owned();
645+
script.push_str(winps_msg.command());
646+
tmp_file.write_content(&script)?;
643647

644648
let mut params = Vec::new();
645649

0 commit comments

Comments
 (0)