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:
@@ -918,9 +918,12 @@ impl ToolchainLister for PythonToolchainProvider {
|
||||
ShellKind::Cmd => "activate.bat",
|
||||
};
|
||||
let path = prefix.join(BINARY_DIR).join(activate_script_name);
|
||||
if fs.is_file(&path).await {
|
||||
activation_script
|
||||
.push(format!("{activate_keyword} \"{}\"", path.display()));
|
||||
|
||||
if let Ok(quoted) =
|
||||
shlex::try_quote(&path.to_string_lossy()).map(Cow::into_owned)
|
||||
&& fs.is_file(&path).await
|
||||
{
|
||||
activation_script.push(format!("{activate_keyword} {quoted}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user