Skip to content

Commit 14941df

Browse files
authored
Add /bin/bash executable to example correct code for pipefail rule (#3731)
1 parent 1cdfc55 commit 14941df

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/ansiblelint/rules/risky_shell_pipe.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ As this requirement does not apply to PowerShell, for shell commands that have
3030
become: false
3131
tasks:
3232
- name: Pipeline with pipefail
33-
ansible.builtin.shell: set -o pipefail && false | cat
33+
ansible.builtin.shell:
34+
cmd: set -o pipefail && false | cat
35+
executable: /bin/bash
3436

3537
- name: Pipeline with pipefail, multi-line
36-
ansible.builtin.shell: |
37-
set -o pipefail # <-- adding this will prevent surprises
38-
false | cat
38+
ansible.builtin.shell:
39+
cmd: |
40+
set -o pipefail # <-- adding this will prevent surprises
41+
false | cat
42+
executable: /bin/bash
3943
```

0 commit comments

Comments
 (0)