Preserve failures during MerlinAU self-update - #606
Merged
ExtremeFiretop merged 1 commit intoSep 24, 2026
Merged
Conversation
maghuro
requested review from
ExtremeFiretop and
Martinski4GitHub
as code owners
September 23, 2026 22:39
maghuro
force-pushed
the
fix/script-update-partial-failure
branch
from
September 24, 2026 00:48
dc1389f to
63e4df3
Compare
ExtremeFiretop
approved these changes
Sep 24, 2026
ExtremeFiretop
left a comment
Owner
There was a problem hiding this comment.
All good, approved and merging.
Owner
|
Nice catch @maghuro !!! Thanks for the help :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix
_DownloadScriptFiles_()so that a failed file download cannot be masked by a later successful download.Problem
retCodeis currently overwritten on every successful download.For example:
version.txtdownload fails ->retCode=1MerlinAU.aspsucceeds ->retCode=0MerlinAU.shsucceeds ->retCode=0The function therefore returns success even though the update was only partially successful.
The same problem exists if the WebUI file fails but the final script download succeeds.
This may cause
_SCRIPT_UPDATE_()to report that the MerlinAU files were successfully updated when one of the required downloads actually failed.Fix
Initialize
retCode=0once at the beginning of_DownloadScriptFiles_().Successful downloads no longer reset the return code. Any download failure sets
retCode=1, and that failure state is preserved for the remainder of the operation.Result
0version.txtfails -> returns1MerlinAU.aspfails -> returns1MerlinAU.shfails -> returns11No download, installation, WebUI remount, or firmware-update behavior is otherwise changed.
Scope
This PR intentionally contains only the return-status fix in
_DownloadScriptFiles_().