mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 09:40:20 +00:00
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
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:
parent
d9934fccab
commit
07f5429db6
1 changed files with 9 additions and 8 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Reference in a new issue