Repository navigation
fix(cli): exit non-zero when --auto-build fails - #641
Open
Siddhanthguptaa wants to merge 1 commit into
Open
Siddhanthguptaa wants to merge 1 commit into
Siddhanthguptaa wants to merge 1 commit into
Conversation
The auto-build step caught CalledProcessError, printed "Build failed" and then fell through to the "Workflow ready!" panel, so the command exited 0. Print the build's stdout/stderr and re-raise, like the generation step does, so cli.py reports the error and exits 1.
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.
Fixes #640
When the build script failed,
concore build --auto-buildprinted "Build failed" but then showed "Workflow ready!" and exited 0. The auto-buildexceptblock now prints the build's stdout and stderr and re-raises, the same as the generation step just above it, socli.pyprintsError: ...and exits 1. stdout is printed too because cmd writes its errors there on Windows.Testing
test_build_command_auto_build_failure_exits_nonzero(only the build-script call fails): fails on current dev (exit 0), passes with this change.ruff check .andruff format --check .pass.--type docker --auto-build(build script not runnable by cmd): before, exit 0 and "Workflow ready!"; after, exit 1 and the cmd error is shown.Not in this PR: when the build script is missing, auto-build is still skipped silently.