This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 871c88f7dc Sanitizing file names in example_bash_decorator DAG (#40949)
871c88f7dc is described below
commit 871c88f7dc784fc55238590ec5ae0651b3131534
Author: Amogh Desai <[email protected]>
AuthorDate: Thu Jul 25 17:53:08 2024 +0530
Sanitizing file names in example_bash_decorator DAG (#40949)
* Sanitizing file names in example_bash_decorator DAG
* review comments
---
airflow/example_dags/example_bash_decorator.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/airflow/example_dags/example_bash_decorator.py
b/airflow/example_dags/example_bash_decorator.py
index 85548ef6fd..36c9c2d7ec 100644
--- a/airflow/example_dags/example_bash_decorator.py
+++ b/airflow/example_dags/example_bash_decorator.py
@@ -99,9 +99,10 @@ def example_bash_decorator():
@task.bash
def get_file_stats() -> str:
+ from shlex import join
+
files = _get_files_in_cwd()
- cmd = "stat "
- cmd += " ".join(files)
+ cmd = join(["stat", *files])
return cmd