Skip to content

refactor: simplify acceptance test error handling - #178

Merged
jmeridth merged 1 commit into
mainfrom
jm_update_acceptance_tests
Feb 15, 2026
Merged

jmeridth merged 1 commit into
mainfrom
jm_update_acceptance_tests

Conversation

@jmeridth

Copy link
Copy Markdown
Member

What

Replace verbose if/then blocks with idiomatic shell || operator for tracking command failures in the acceptance test script.

Why

The repeated $? check pattern is unnecessarily verbose. The || idiom is the standard shell approach for "run but record failure" and reduces the script from 40 lines to 14 with identical behavior.

Notes

  • No behavioral change — all commands still run regardless of earlier failures, and the aggregate exit status is preserved

## What

Replace verbose if/then blocks with idiomatic shell || operator for
tracking command failures in the acceptance test script.

## Why

The repeated $? check pattern is unnecessarily verbose. The || idiom
is the standard shell approach for "run but record failure" and
reduces the script from 40 lines to 14 with identical behavior.

## Notes

- No behavioral change — all commands still run regardless of
  earlier failures, and the aggregate exit status is preserved

Signed-off-by: jmeridth <jmeridth@gmail.com>
@jmeridth jmeridth self-assigned this Feb 15, 2026
@jmeridth
jmeridth requested review from a team and Copilot February 15, 2026 07:25
@jmeridth
jmeridth merged commit b64b4d5 into main Feb 15, 2026
9 checks passed
@jmeridth
jmeridth deleted the jm_update_acceptance_tests branch February 15, 2026 07:26

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors the acceptance test script to use idiomatic shell error handling. The verbose if/then blocks that checked $? after each command are replaced with the standard || STATUS=1 operator pattern, reducing the script size while maintaining identical behavior.

Changes:

  • Replaced six verbose if/then blocks with concise || STATUS=1 operators for error tracking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants