kaxil commented on a change in pull request #12638:
URL: https://github.com/apache/airflow/pull/12638#discussion_r530847419



##########
File path: airflow/operators/bash.py
##########
@@ -157,14 +163,37 @@ def pre_exec():
 
             self.log.info('Running command: %s', self.bash_command)
 
-            self.sub_process = Popen(  # pylint: 
disable=subprocess-popen-preexec-fn
-                ['bash', "-c", self.bash_command],
-                stdout=PIPE,
-                stderr=STDOUT,
-                cwd=tmp_dir,
-                env=env,
-                preexec_fn=pre_exec,
-            )
+            if isinstance(self.bash_command) == str and not 
_is_bash_script(self.bash_command):

Review comment:
       This PR needs some tests too @dimberman 




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