mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Fix update of undefined env var in npm module
This commit is contained in:
parent
a71c1b7c8b
commit
c8514de334
1 changed files with 9 additions and 0 deletions
|
@ -119,6 +119,9 @@ def install(pkg=None,
|
|||
elif pkgs:
|
||||
cmd += ' "{0}"'.format('" "'.join(pkgs))
|
||||
|
||||
if env is None:
|
||||
env = {}
|
||||
|
||||
if runas:
|
||||
uid = salt.utils.get_uid(runas)
|
||||
if uid:
|
||||
|
@ -188,6 +191,9 @@ def uninstall(pkg,
|
|||
|
||||
'''
|
||||
|
||||
if env is None:
|
||||
env = {}
|
||||
|
||||
if runas:
|
||||
uid = salt.utils.get_uid(runas)
|
||||
if uid:
|
||||
|
@ -245,6 +251,9 @@ def list_(pkg=None,
|
|||
|
||||
'''
|
||||
|
||||
if env is None:
|
||||
env = {}
|
||||
|
||||
if runas:
|
||||
uid = salt.utils.get_uid(runas)
|
||||
if uid:
|
||||
|
|
Loading…
Add table
Reference in a new issue