Overview
Standardize exit codes across dev-cache, git-cleaner, and mac-cache-cleaner so scripts can reliably detect success, failure, and "nothing to do" states.
Implementation Plan
-
Convention
| Code |
Meaning |
| 0 |
Success |
| 1 |
General error (config, flags, runtime) |
| 2 |
Nothing to clean / no findings (optional) |
| 3 |
Partial failure (some operations failed) |
-
Per-app behavior
- dev-cache: 0 = success; 1 = config/init error; 2 = no findings when that's distinct
- git-cleaner: Same
- mac-cache-cleaner: Same; 3 = some targets failed
-
Implementation
- Replace
os.Exit(1) with consistent codes
- Document in README and --help
- Scripts can branch:
if [ $? -eq 2 ]; then echo "Nothing to clean"; fi
Acceptance Criteria
Overview
Standardize exit codes across dev-cache, git-cleaner, and mac-cache-cleaner so scripts can reliably detect success, failure, and "nothing to do" states.
Implementation Plan
Convention
Per-app behavior
Implementation
os.Exit(1)with consistent codesif [ $? -eq 2 ]; then echo "Nothing to clean"; fiAcceptance Criteria