Bug #29786
closedMake options for install and update commands consistent
Description
The foreman-maintain update
and foreman-maintain install
commands behave differently when --assumeyes
option is provided at wrong position:
1) update will correctly fail:
# bin/foreman-maintain packages update httpd --assumeyes ERROR: too many arguments See: 'foreman-maintain packages update --help'
2) but install will run, ignoring the --assumeyes
option:
# bin/foreman-maintain packages install httpd --assumeyes Running preparation steps required to run the next scenarios ================================================================================ Check if tooling for package locking is installed: [OK] -------------------------------------------------------------------------------- Running install packages in unlocked session ================================================================================ Confirm installer run is allowed: WARNING: This script runs satellite-installer after the yum execution to ensure the Satellite is in a consistent state. As a result some of your services may be restarted. Do you want to proceed?, [y(yes), q(quit)]
Both should fail (as in the first case) and should be non-interactive if the --assumeyes
is provided at the right position:
# bin/foreman-maintain packages install --help Usage: foreman-maintain packages install [OPTIONS] PACKAGES ... Parameters: PACKAGES ... packages to install Options: -y, --assumeyes Automatically answer yes for all questions -w, --whitelist whitelist Comma-separated list of labels of steps to be skipped -f, --force Force steps that would be skipped as they were already run -h, --help print help
Updated by Suraj Patil over 4 years ago
Please try to pass the option "--assumeyes" before the package name.
As it is described in the command usage, [OPTIONS] should come before PACKAGES.
# bin/foreman-maintain packages install --help
Usage:
foreman-maintain packages install [OPTIONS] PACKAGES ...
Updated by Vladimir Sedmik over 4 years ago
Suraj Patil wrote:
Please try to pass the option "--assumeyes" before the package name.
As it is described in the command usage, [OPTIONS] should come before PACKAGES.
[...]
Yes, when the option is on the right position, it works. This issue was meant that in case 2) it should behave the same (show an error) as in case 1).