project: Fix terminal activation scripts failing on Windows for new shells (#37986)

Tasks are still disabled as there seem to be more issues with it

Release Notes:

- N/A
This commit is contained in:
Lukas Wirth
2025-09-11 12:16:08 +00:00
committed by GitHub
parent 6ae83b4740
commit 4002602a89
7 changed files with 38 additions and 43 deletions
+6 -2
View File
@@ -531,10 +531,14 @@ impl TerminalBuilder {
},
};
if cfg!(not(target_os = "windows")) && !activation_script.is_empty() && no_task {
if !activation_script.is_empty() && no_task {
for activation_script in activation_script {
terminal.input(activation_script.into_bytes());
terminal.write_to_pty(b"\n");
terminal.write_to_pty(if cfg!(windows) {
&b"\r\n"[..]
} else {
&b"\n"[..]
});
}
terminal.clear();
}