Repository navigation
A small fix for scripts that check the exit status, based on feedback from an integration.
Fixed
Invalid options exit with 1, not 2
An invalid command-line option ended the run with exit status 2. The same status means "the sheets were written, but some files were skipped", even though nothing had been written. This applied to an out-of-range value, an unknown flag and a missing photo directory:
contact-sheet --dpi 1200 ~/Scans/roll-042
# error: invalid value '1200' for '--dpi <DPI>': 1200 is not in 72..=600
echo $? # v0.7.0: 2 v0.7.1: 1Invalid options now exit with 1, like every other error where no sheets are written. --help and --version still exit with 0.
| Exit status | Meaning |
|---|---|
0 |
Every photo is on the sheets. |
1 |
Error, e.g. an invalid option, the folder cannot be read or no photo could be loaded; no sheets were written. |
2 |
The sheets were written, but some files could not be read and were skipped (each is listed on stderr). |
Note
Status 2 now always means that sheets were written. Scripts no longer need the Done: line to tell a skipped file from a mistyped option. If a script treated 2 as "bad arguments", it now gets 1 for those.
A new test runs the built program and checks these statuses, so this cannot come back unnoticed.
Install
brew install msetkowski/tap/contact-sheet # macOS and Linux
cargo binstall contact-sheet # prebuilt binary via Cargo
cargo install contact-sheet # build from crates.io (Rust 1.89+)Or download an archive:
| Platform | Archive |
|---|---|
| macOS (Apple silicon) | contact-sheet-v0.7.1-aarch64-apple-darwin.tar.gz |
| macOS (Intel) | contact-sheet-v0.7.1-x86_64-apple-darwin.tar.gz |
| Linux (x86_64, static) | contact-sheet-v0.7.1-x86_64-unknown-linux-musl.tar.gz |
| Linux (ARM64, static) | contact-sheet-v0.7.1-aarch64-unknown-linux-musl.tar.gz |
| Windows (x86_64) | contact-sheet-v0.7.1-x86_64-pc-windows-msvc.zip |
Each archive has a .sha256 checksum next to it. On macOS, run xattr -d com.apple.quarantine contact-sheet before the first start of a downloaded binary (not needed with Homebrew).
Full Changelog: v0.7.0...v0.7.1