Skip to content

Commit

Permalink
Sanitizing file names in example_bash_decorator DAG (apache#40949)
Browse files Browse the repository at this point in the history
* Sanitizing file names in example_bash_decorator DAG

* review comments
  • Loading branch information
amoghrajesh authored Jul 25, 2024
1 parent e0ff05f commit 871c88f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions airflow/example_dags/example_bash_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ def _get_files_in_cwd() -> list[str]:

@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

Expand Down

0 comments on commit 871c88f

Please sign in to comment.