Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,6 @@ def __init__(
self.cwd = cwd
self.append_env = append_env
self.output_processor = output_processor
self._is_inline_cmd = None
if isinstance(bash_command, str):
self._is_inline_cmd = self._is_inline_command(bash_command=bash_command)

@cached_property
def subprocess_hook(self):
"""Returns hook for running the bash command."""
Expand Down Expand Up @@ -215,7 +211,11 @@ 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:
result = self._run_inline_command(bash_path=bash_path, env=env)
else:
result = self._run_rendered_script_file(bash_path=bash_path, env=env)
Expand Down
1 change: 0 additions & 1 deletion scripts/ci/prek/validate_operators_init_exemptions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,5 @@ providers/microsoft/azure/src/airflow/providers/microsoft/azure/transfers/oracle
providers/microsoft/psrp/src/airflow/providers/microsoft/psrp/operators/psrp.py::PsrpOperator
providers/oracle/src/airflow/providers/oracle/transfers/oracle_to_oracle.py::OracleToOracleOperator
providers/papermill/src/airflow/providers/papermill/operators/papermill.py::PapermillOperator
providers/standard/src/airflow/providers/standard/operators/bash.py::BashOperator
providers/standard/src/airflow/providers/standard/operators/trigger_dagrun.py::TriggerDagRunOperator
providers/standard/src/airflow/providers/standard/sensors/date_time.py::DateTimeSensor
Loading