Skip to main content

Module version_flag

Module version_flag 

Source
Expand description

agentmux --version (or -V): print the version and exit 0, starting nothing.

Without this the flag fell through to the normal start: the launcher brought up srv and the CEF host, whose own --version handling printed the Chromium version, so a person checking an install (the install page says to) saw no AgentMux version at all, and on Ubuntu the sandbox check stopped it first. The deb and rpm wrappers, the tarball’s agentmux.sh and the AppImage’s AppRun all exec this launcher with their arguments, so one check here covers them (AppRun answers it earlier still, before it unpacks anything).

Functions§

line 🔒
The one line printed. A local build also names its build label, which is how two builds of the same version tell apart; a release build’s label is its version, so nothing is added.
requested 🔒
Only the first argument counts: agentmux --version, not a --version somewhere in a command line that means something else.
run_if_requested
Some(exit code) after printing the version when the arguments ask for it; None otherwise.