Skip to content

Commit

Permalink
Merge pull request #3 from temp20230620/patch-3
Browse files Browse the repository at this point in the history
Make Jinja variable regex lazy
  • Loading branch information
mschuett authored Jul 30, 2023
2 parents 72ca7ca + de604e5 commit 84d0714
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion yaml_shellcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def get_shell_tasks(data, path):
# we cannot evaluate Jinja templates
# at least try to be useful and replace every expression with a variable
# we do not handle Jinja statements like loops of if/then/else
script = re.sub(r"{{.*}}", "$JINJA_EXPRESSION", script)
script = re.sub(r"{{.*?}}", "$JINJA_EXPRESSION", script)

# try to add shebang line from 'executable' if it looks like a shell
executable = task.get("args", {}).get("executable", None)
Expand Down

0 comments on commit 84d0714

Please sign in to comment.