mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #27657 from garethgreenaway/19291_pkg_state_latest_fix
Fix to pkg state module
This commit is contained in:
commit
905acc6229
1 changed files with 4 additions and 0 deletions
|
@ -933,6 +933,10 @@ def installed(
|
|||
|
||||
if version is not None and version == 'latest':
|
||||
version = __salt__['pkg.latest_version'](name)
|
||||
# If version is empty, it means the latest version is installed
|
||||
# so we grab that version to avoid passing an empty string
|
||||
if not version:
|
||||
version = __salt__['pkg.version'](name)
|
||||
|
||||
kwargs['allow_updates'] = allow_updates
|
||||
result = _find_install_targets(name, version, pkgs, sources,
|
||||
|
|
Loading…
Add table
Reference in a new issue