Bug#816437: apt displays “Command line option is not understood” when the subcommand is wrong
Package: apt
Version: 1.2.3
Severity: minor
Dear Maintainer,
When apt(8) is involed with a non-existing subcommand and an option,
an error is reported about the option rather than about the subcommand:
> % apt lits --upgradable
> E: Command line option --upgradable is not understood in combination with the other options
Would it be posible, instead, to report first errors about
non-existing subcommands?
Best,
nicoo
-- Package-specific info:
-- /etc/apt/preferences --
Package: *
Pin: release n=stretch
Pin-Priority: 900
-- (/etc/apt/sources.list present, but not submitted) --
-- System Information:
Debian Release: stretch/sid
APT prefers testing
APT policy: (900, 'testing')
Architecture: amd64 (x86_64)
Kernel: Linux 4.3.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_US.UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages apt depends on:
ii adduser 3.113+nmu3
ii debian-archive-keyring 2014.3
ii gnupg 1.4.20-4
ii gnupg2 2.1.11-5
ii gpgv 1.4.20-4
ii libapt-pkg5.0 1.2.3
ii libc6 2.21-9
ii libgcc1 1:5.3.1-8
ii libstdc++6 5.3.1-8
apt recommends no packages.
Versions of packages apt suggests:
pn apt-doc <none>
ii aptitude 0.7.5-3
ii dpkg-dev 1.18.4
ii python-apt 1.1.0~beta1
-- no debconf information
Reply to: