CI: fail fast when the Qt install fails on Windows - #579
Merged
luisangelsm merged 1 commit intoAug 1, 2026
Merged
Conversation
The Windows install steps run under `shell: cmd`, which has no equivalent of `set -e`: every line runs regardless of what came before, and the step takes its exit code from the last command. When `aqt install-qt` fails, the trailing `where iscc` still succeeds, so the step is reported green with an incomplete Qt installation. The failure then surfaces about a minute later in the Build step as `Failed to find required Qt component "ShaderTools"` followed by `ninja: error: loading 'build.ninja'`, which gives no hint that Qt was never installed in the first place. Seen on a recent run, where aqt aborted with `py7zr.exceptions.Bad7zFile: Specified path is bad: metatypes/qt6shadertools_metatypes.json` while unpacking qtshadertools downloaded from a mirror, and the job was left looking like a build error. Guard the three `install-qt` calls with `|| exit /b 1` so the step fails where the problem actually is, with aqt's own error on screen. The macOS job needs no change: it uses the default shell, which already exits on error.
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.
The Windows install steps run under
shell: cmd, which has no equivalent ofset -e: every line runs regardless of what came before, and the step takes its exit code from the last command. Whenaqt install-qtfails, the trailingwhere isccstill succeeds, so the step is reported green with an incomplete Qt installation.The failure then surfaces about a minute later in the Build step as
Failed to find required Qt component "ShaderTools"followed byninja: error: loading 'build.ninja', which gives no hint that Qt was never installed in the first place.Seen on a recent run, where aqt aborted with
py7zr.exceptions.Bad7zFile: Specified path is bad: metatypes/qt6shadertools_metatypes.jsonwhile unpacking qtshadertools downloaded from a mirror, and the job was left looking like a build error.Guard the three
install-qtcalls with|| exit /b 1so the step fails where the problem actually is, with aqt's own error on screen. The macOS job needs no change: it uses the default shell, which already exits on error.