fix: cas has now returns exit 1 for non-existent hashes #482
Reference in New Issue
Block a user
Delete Branch "fix/481-cas-has-exit-code"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Changed the exit behavior of
uwf cas hasto return exit code 1 when a hash doesn't exist.Why
This enables proper use in shell conditionals like
if uwf cas has $HASH; then ..., which is the expected behavior for boolean check commands in Unix/Linux environments.Changes
packages/cli-workflow/src/cli.tsto exit with code 1 when hash doesn't exist{exists:false}for programmatic consumptioncas-exit-code.test.tsto verify exit codescas.test.tsfor command validationRef
Fixes #481
Changed the exit behavior of 'uwf cas has' to return exit code 1 when a hash doesn't exist, while preserving the JSON output {exists:false}. This enables proper use in shell conditionals like 'if uwf cas has $HASH'. Fixes #481Code Review — 小橘 🍊
Verdict: Approved ✅
LGTM,可以合并 🍊