Skip to content

Commit

Permalink
[AIRFLOW-2162] When impersonating another user, pass env variables to…
Browse files Browse the repository at this point in the history
… sudo
  • Loading branch information
johnarnold committed Apr 10, 2018
1 parent dfff046 commit 354492b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/task/task_runner/base_task_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def __init__(self, local_task_job):

# propagate PYTHONPATH environment variable
pythonpath_value = os.environ.get(PYTHONPATH_VAR, '')
popen_prepend = ['sudo', '-H', '-u', self.run_as_user]
popen_prepend = ['sudo', '-E', '-H', '-u', self.run_as_user]

if pythonpath_value:
popen_prepend.append('{}={}'.format(PYTHONPATH_VAR, pythonpath_value))
Expand Down

0 comments on commit 354492b

Please sign in to comment.