mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Downgrade must uninstall the newer msi
This commit is contained in:
parent
f7c027402d
commit
d9934fccab
1 changed files with 8 additions and 3 deletions
|
@ -795,9 +795,14 @@ class SaltPkgInstall:
|
|||
|
||||
if self.file_ext == "msi":
|
||||
|
||||
# XXX: Both packages end up installed, should we uninstall the old one?
|
||||
# ret = subprocess.run(f"msiexec.exe /qn /x {pkg} /norestart", shell=True)
|
||||
# assert ret.returncode == 0
|
||||
# MSI can not be downgraded, we must remove the newer version
|
||||
# before installing the old one.
|
||||
ret = subprocess.run(
|
||||
f"msiexec.exe /qn /x {pkg} /norestart",
|
||||
shell=True, # nosec
|
||||
check=False,
|
||||
)
|
||||
assert ret.returncode == 0
|
||||
|
||||
# self.proc.run always makes the command a list even when shell
|
||||
# is true, meaning shell being true will never work correctly.
|
||||
|
|
Loading…
Add table
Reference in a new issue