Skip to content

Fix inline-env-var false positive when expand_argument_vars is used #4587

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
1 change: 1 addition & 0 deletions src/ansiblelint/rules/inline_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class EnvVarsInCommandRule(AnsibleLintRule):
"chdir",
"creates",
"executable",
"expand_argument_vars",
"removes",
"stdin",
"stdin_add_newline",
Expand Down
5 changes: 5 additions & 0 deletions test/rules/test_inline_env_var.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
command: echo
args:
strip_empty_ends: false

- name: Command with expand_argument_vars option
command:
cmd: /bin/echo $LITERAL
expand_argument_vars: false
"""

FAIL_PLAY_TASKS = """
Expand Down
Loading