mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Bugfix: do not treat SLS id as a package name if an empty 'pkgs' list specified.
This commit is contained in:
parent
d3cfd8ed41
commit
ee9b3f859b
1 changed files with 9 additions and 1 deletions
|
@ -1391,7 +1391,15 @@ def latest(
|
|||
'comment': 'Invalidly formatted "pkgs" parameter. See '
|
||||
'minion log.'}
|
||||
else:
|
||||
desired_pkgs = [name]
|
||||
if isinstance(pkgs, list) and len(pkgs) == 0:
|
||||
return {
|
||||
'name': name,
|
||||
'changes': {},
|
||||
'result': True,
|
||||
'comment': 'No packages to install provided'
|
||||
}
|
||||
else:
|
||||
desired_pkgs = [name]
|
||||
|
||||
cur = __salt__['pkg.version'](*desired_pkgs, **kwargs)
|
||||
try:
|
||||
|
|
Loading…
Add table
Reference in a new issue