You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix: Preserve exit codes from shell commands and workflows (#1660)
* Changes auto-committed by Conductor
* Changes auto-committed by Conductor
* Changes auto-committed by Conductor
* updates
* updates
* Changes auto-committed by Conductor
* updates
* updates
* updates
* Fix duplicate exit code error messages using error wrapping pattern…
* [autofix.ci] apply automated fixes
* Fix duplicate exit code error messages by moving OsExit to errors package
- Move OsExit variable from pkg/utils to errors package to avoid import cycle
- Update all references to use errUtils.OsExit instead of utils.OsExit
- This fixes the issue where tests were failing because Exit() called os.Exit() directly
- The mockable OsExit is now in the errors package where Exit() function resides
- Resolves duplicate error message output in test failures
* Fix duplicate error message in shell runner exit code handling
- Remove errors.Join() that was combining ExitCodeError with original error
- Return only ExitCodeError to avoid duplicate message like 'subcommand exited with code 1 exit status 1'
- Update golden snapshot to reflect correct error message format
- Error message is now just 'subcommand exited with code 1' without duplication
* Remove temporary development files
- Remove check_fix_all_worktrees.sh (temporary worktree debugging script)
- Remove fix_worktree_indexes.sh (temporary worktree repair script)
- Remove test-fixes.patch (temporary patch file for testing)
These were development artifacts that should not be in the repository.
* Fix markdown linting issues in auth list blog post
- Add 'text' language identifier to code block (fixes MD040)
- Replace bold emphasis with proper heading syntax (fixes MD036)
- Convert **Quick Overview**, **Detailed Tree View**, and **Automation Integration** to #### headings
- Maintain consistent heading hierarchy within the document
* Fix duplicate error printing in workflow execution
- Make IsKnownWorkflowError recognize ExitCodeError as a known/handled error
- This prevents error from being printed twice (once by workflow, once by main.go)
- Return original error from workflow step failure to preserve exit code
- Workflow context error is already printed before returning
- Maintains error chain for proper exit code handling without duplication
* Remove auth-list blog post (covered by separate PR)
This file was accidentally included in this branch and is covered by the
osterman/auth-list-cmd PR. Removing to keep this PR focused on exit code fixes.
* Fix workspace creation to detect ExitCodeError instead of ExitError
- Updated terraform workspace handling to check for ExitCodeError with code 1
- Previously checked for os/exec.ExitError but ExecuteShellCommand now returns ExitCodeError
- This fixes tests failing with 'Workspace doesn't exist' errors
- Workspace creation fallback now works correctly when workspace select fails
- Resolves test failures: terraform_output_function, env_function, terraform_apply_env, etc.
* Update circuit-breaker test snapshot to remove trailing whitespace
- Regenerated snapshot for TestCLICommands/atmos_circuit-breaker test
- Removed excessive trailing whitespace from error message lines
- Snapshot now matches actual output without trailing spaces
- Error message 'subcommand exited with code 1' is now clean
* updates
* updates
---------
Co-authored-by: aknysh <[email protected]>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Andriy Knysh <[email protected]>
0 commit comments