Skip to content

release: print the installed version in the GNU flag form - #52

Merged
guygrigsby merged 1 commit into
mainfrom
guy/install-sh-version-flag
Oct 16, 2026
Merged

guygrigsby merged 1 commit into
mainfrom
guy/install-sh-version-flag

Conversation

@guygrigsby

Copy link
Copy Markdown
Contributor

install.sh called the binary it had just installed as aperture -version. aperture rewrites that single-dash form to --version and warns on stderr, so every fresh install ended with a deprecation notice about a flag nobody typed.

Switches install.sh to call aperture --version directly. --version works on every release install.sh can install, including pre-0.1.0 binaries, since the standard library's flag package has always treated one and two leading dashes alike.

Added a test in scripts/sign_macos_test.go that greps install.sh for the flag form, since no Go test runs the installer and checks its output.

install.sh called the binary it had just installed as `aperture -version`.
gnuForm rewrites that single-dash long form and warns on stderr, so every
fresh install ended on a deprecation notice about a flag the user never
typed.

`--version` works on every release install.sh can install. Pre-0.1.0
binaries parsed flags with the standard library's flag package, which treats
one and two leading dashes alike.

A scripts test holds the GNU form because no Go test sees the installer's
output.
@guygrigsby
guygrigsby merged commit 27c4f56 into main Oct 16, 2026
3 checks passed
@guygrigsby
guygrigsby deleted the guy/install-sh-version-flag branch October 16, 2026 19:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant