Commit 05d8736
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.1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1093 | 1093 | | |
1094 | 1094 | | |
1095 | 1095 | | |
1096 | | - | |
| 1096 | + | |
1097 | 1097 | | |
1098 | 1098 | | |
1099 | 1099 | | |
| |||
0 commit comments