mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Install correct package version, if provided, for npm state.
Fixes #23343 We already have taken care of the correct formatting for either a list of packages, or a single package name with 'pkg_list'. Let's use it so the version information can be passed to the install function as well as the name.
This commit is contained in:
parent
f606c23ea8
commit
a0ed857c37
1 changed files with 1 additions and 5 deletions
|
@ -186,13 +186,9 @@ def installed(name,
|
|||
'runas': user,
|
||||
'registry': registry,
|
||||
'env': env,
|
||||
'pkgs': pkg_list,
|
||||
}
|
||||
|
||||
if pkgs is not None:
|
||||
cmd_args['pkgs'] = pkgs
|
||||
else:
|
||||
cmd_args['pkg'] = pkg_name
|
||||
|
||||
call = __salt__['npm.install'](**cmd_args)
|
||||
except (CommandNotFoundError, CommandExecutionError) as err:
|
||||
ret['result'] = False
|
||||
|
|
Loading…
Add table
Reference in a new issue