mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Try byte literals rather than unicode strings in the env
This commit is contained in:
parent
c8514de334
commit
6fde58182f
1 changed files with 3 additions and 3 deletions
|
@ -125,7 +125,7 @@ def install(pkg=None,
|
|||
if runas:
|
||||
uid = salt.utils.get_uid(runas)
|
||||
if uid:
|
||||
env.update({'SUDO_UID': uid, 'SUDO_USER': ''})
|
||||
env.update({'SUDO_UID': b'{0}'.format(uid), 'SUDO_USER': b''})
|
||||
|
||||
result = __salt__['cmd.run_all'](cmd, python_shell=False, cwd=dir, runas=runas, env=env)
|
||||
|
||||
|
@ -197,7 +197,7 @@ def uninstall(pkg,
|
|||
if runas:
|
||||
uid = salt.utils.get_uid(runas)
|
||||
if uid:
|
||||
env.update({'SUDO_UID': uid, 'SUDO_USER': ''})
|
||||
env.update({'SUDO_UID': b'{0}'.format(uid), 'SUDO_USER': b''})
|
||||
|
||||
cmd = 'npm uninstall'
|
||||
|
||||
|
@ -257,7 +257,7 @@ def list_(pkg=None,
|
|||
if runas:
|
||||
uid = salt.utils.get_uid(runas)
|
||||
if uid:
|
||||
env.update({'SUDO_UID': uid, 'SUDO_USER': ''})
|
||||
env.update({'SUDO_UID': b'{0}'.format(uid), 'SUDO_USER': b''})
|
||||
|
||||
cmd = 'npm list --silent --json'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue