mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #24475 from rallytime/bp-24454
Back-port #24454 to 2015.5
This commit is contained in:
commit
8618d5b6ea
1 changed files with 2 additions and 2 deletions
|
@ -270,8 +270,8 @@ def _run(cmd,
|
|||
# Getting the environment for the runas user
|
||||
# There must be a better way to do this.
|
||||
py_code = (
|
||||
'import os, itertools; '
|
||||
'print \"\\0\".join(itertools.chain(*os.environ.items()))'
|
||||
'import sys, os, itertools; '
|
||||
'sys.stdout.write(\"\\0\".join(itertools.chain(*os.environ.items())))'
|
||||
)
|
||||
if __grains__['os'] in ['MacOS', 'Darwin']:
|
||||
env_cmd = ('sudo', '-i', '-u', runas, '--',
|
||||
|
|
Loading…
Add table
Reference in a new issue