Do not try to uninstall unless downgrading
Some checks are pending
CI / Prepare Workflow Run (push) Waiting to run
CI / Pre-Commit (push) Blocked by required conditions
CI / Lint (push) Blocked by required conditions
CI / NSIS Tests (push) Blocked by required conditions
CI / Prepare Release: (push) Blocked by required conditions
CI / Documentation (push) Blocked by required conditions
CI / Build Source Tarball (push) Blocked by required conditions
CI / Build Salt Onedir (push) Blocked by required conditions
CI / Build Packages (push) Blocked by required conditions
CI / CI Deps (push) Blocked by required conditions
CI / Test Package (push) Blocked by required conditions
CI / Test Salt (push) Blocked by required conditions
CI / Combine Code Coverage (push) Blocked by required conditions
CI / Set the Pipeline Exit Status (push) Blocked by required conditions

This commit is contained in:
Daniel A. Wozniak 2025-03-18 17:48:44 -07:00
parent d9934fccab
commit 07f5429db6

View file

@ -795,14 +795,15 @@ class SaltPkgInstall:
if self.file_ext == "msi":
# 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
if downgrade:
# 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.