mik-laj commented on issue #13445:
URL: https://github.com/apache/airflow/issues/13445#issuecomment-753774982


   Copying all the environmental ones doesn't sound good to me. There are cases 
when Airflow has certain environmental variables, and the script should not 
have these variables, especially since environment variables very often contain 
secrets.
   
   You can easily add this behavior in your DAG code so I don't see any reason 
to make suggested change.
   ````bash
       task = BashOperator(
           task_id='runme',
           bash_command='./my-script.sh ',
           dag=dag,
           env={
               'CUSTOM_ENV': 'CUSTOM_VALUE',
               **os.environ
           }
       )
   ````
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to