uranusjr commented on code in PR #70437:
URL: https://github.com/apache/airflow/pull/70437#discussion_r3652285051
##########
providers/standard/src/airflow/providers/standard/operators/bash.py:
##########
@@ -215,7 +212,10 @@ def execute(self, context: Context):
raise AirflowException(f"The cwd {self.cwd} must be a
directory")
env = self.get_env(context)
- if self._is_inline_cmd:
+ is_inline_cmd = isinstance(self.bash_command, str) and
self._is_inline_command(
+ bash_command=self.bash_command
+ )
+ if is_inline_cmd:
Review Comment:
The isinstance check can be folded in `_is_inline_command` and this can
simply be
```python
if self._is_inline_command(self.bash_command):
...
else:
...
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]