fix(cli): use lowercase version option

This commit is contained in:
bryanpedini committed 2026-11-02 20:26:37 +01:00
1 parent 5f90c24b8d
commit 2aa0a21056
3 files changed
+11 -9

No files matched your search

+1 -1
View File
@@ -59,7 +59,7 @@ options:
none (default: paru, else yay, when installed; other backends ignore it)
--no-aur same as --aur-helper=none
-h, --help this help
-V, --version print the version
-v, --version print the version
```
Exit status: `0` ok, `1` usage or backend error, `2` aborted (end of input),
+4 -4
View File
@@ -6,7 +6,7 @@
# and zypper: list what would be upgraded, interrogate every package, remember the
# ones you trust, then run the native upgrade (with per-run exclusions).
#
# Version: 0.3.0
# Version: 0.3.1
#
# Specification: docs/DESIGN.md. Single file, bash >= 4.3, no runtime dependency
# beyond the distro's package manager and coreutils/sed/grep (awk only on the apt
@@ -23,7 +23,7 @@ export LC_ALL=C DEBIAN_FRONTEND=noninteractive
# never read from or written to a file (no HISTFILE; `history -r`/`-w`/`-a` are never used).
unset HISTFILE
readonly SU_VERSION=0.3.0
readonly SU_VERSION=0.3.1
readonly SU_PROG=skeptical-updater
readonly SU_STATE_HEADER='# skeptical-updater trusted packages. Columns: backend package reason added(UTC ISO-8601)'
readonly SU_PROMPT_HELP='<enter> upgrade | N? what is it | N?? full info | N- exclude this run | Nx purge now | N+ trust forever'
@@ -105,7 +105,7 @@ options:
none (default: paru, else yay, when installed; other backends ignore it)
--no-aur same as --aur-helper=none
-h, --help this help
-V, --version print the version
-v, --version print the version
interactive commands (one line, whitespace-separated tokens, N = number in brackets):
<empty line> proceed: run the native upgrade with the current exclusions
@@ -199,7 +199,7 @@ parse_args() {
usage
exit 0
;;
-V | --version)
-v | --version)
printf '%s %s\n' "$SU_PROG" "$SU_VERSION"
exit 0
;;
+6 -4
View File
@@ -24,12 +24,14 @@ setup() { common_setup; }
assert_line 'usage: skeptical-updater [options] [command]'
}
@test "--version and -V print the version" {
@test "--version and -v print the version" {
run skup --version
assert_success
assert_output 'skeptical-updater 0.1.0'
run skup -V
assert_output 'skeptical-updater 0.1.0'
assert_output --regexp '^skeptical-updater [0-9]+\.[0-9]+\.[0-9]+(\+(alpha|beta|rc)[.-]?[0-9]+)?$'
local version=$output
run skup -v
assert_success
assert_output "$version"
}
@test "an unknown option is a usage error (exit 1)" {