Skip to content

Commit 05d8736

Browse files
authored
Unrolled build for #157879
Rollup merge of #157879 - SebTardif:fix-powershell-download-fallback, r=clubby789 bootstrap: fix inverted success check in PowerShell download fallback When curl fails on Windows and bootstrap falls back to PowerShell for downloads, the success/failure check is inverted: the code returns early on failure (`is_failure()`) and prints "spurious failure, trying again" on success, then exits with code 1 after three successful downloads. This was introduced in #141909 during the `ExecutionContext` refactoring. The original code used `self.try_run(...)` which returned `bool` (true = success). The refactoring changed the return type to `CommandOutput` but used `is_failure()` for the early-return check, inverting the logic. The fix changes the check from `is_failure()` to `is_success()`, restoring the original behavior: return early when the download succeeds, retry when it fails.
2 parents 01dfd79 + 893a9f8 commit 05d8736

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/bootstrap/src/core/download.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ fn download_http_with_retries(
10931093
),
10941094
]).run_capture_stdout(exec_ctx);
10951095

1096-
if powershell.is_failure() {
1096+
if powershell.is_success() {
10971097
return;
10981098
}
10991099

0 commit comments

Comments
 (0)