You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/11/17 18:04:53 UTC

[GitHub] [airflow] potiuk commented on issue #13942: Bash Operator can't run custom bash commands

potiuk commented on issue #13942:
URL: https://github.com/apache/airflow/issues/13942#issuecomment-971826977


   This is not a problem with BashOperator, but misunderstanding how .bashrc works.  The `.bashrc` is only sourced for "interactive" login and remote non-interactive shell sessions (executed via ssh-daemon). Baasically .bashrc will only be sourced automatically if there is a human typing the command to execute.
   
   For any kind of "unsupervised" bash command (for example when you run cron scripts) you need to manually source the .bashrc file if you want to process any custom code there:
   
   ```
   source /opt/airflow/.bashrc && command
   ```


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org