When current_zone_only is True, ensure we append the -G options to the cmd_prefix list correctly

This commit is contained in:
Gareth J. Greenaway 2022-07-12 11:21:39 -07:00 committed by Megan Wilhite
parent d6740631ae
commit 4449286632
3 changed files with 4 additions and 7 deletions

1
changelog/62206.fixed Normal file
View file

@ -0,0 +1 @@
Adding -G option to pkgdd cmd_prefix list when current_zone_only is True.

View file

@ -361,7 +361,7 @@ def install(name=None, sources=None, saltenv="base", **kwargs):
# Only makes sense in a global zone but works fine in non-globals.
if kwargs.get("current_zone_only") in (True, "True"):
cmd_prefix += "-G "
cmd_prefix.append("-G ")
errors = []
for pkg in pkg_params:

View file

@ -181,9 +181,7 @@ def test_install_single_named_package_global_zone_boolean():
"-n",
"-a",
ANY,
"-",
"G",
" ",
"-G ",
"-d",
install_target,
"all",
@ -241,9 +239,7 @@ def test_install_single_named_package_global_zone_text():
"-n",
"-a",
ANY,
"-",
"G",
" ",
"-G ",
"-d",
install_target,
"all",