askpass: Quote askpass script in askpass helper command (#43542)

Closes #40276

Release Notes:

- Fixed askpass execution failing on windows sometimes
This commit is contained in:
Lukas Wirth
2025-11-26 12:17:57 +00:00
committed by GitHub
parent b9af6645e3
commit 1e6a05d0d8
+6 -2
View File
@@ -249,11 +249,15 @@ impl PasswordProxy {
fs::write(&askpass_script_path, askpass_script)
.await
.with_context(|| format!("creating askpass script at {askpass_script_path:?}"))?;
make_file_executable(&askpass_script_path).await?;
make_file_executable(&askpass_script_path)
.await
.with_context(|| {
format!("marking askpass script executable at {askpass_script_path:?}")
})?;
// todo(shell): There might be no powershell on the system
#[cfg(target_os = "windows")]
let askpass_helper = format!(
"powershell.exe -ExecutionPolicy Bypass -File {}",
"powershell.exe -ExecutionPolicy Bypass -File '{}'",
askpass_script_path.display()
);