You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Shellcheck 0.10.0 will not warn SC2030 and SC2031 (variable assignment in a subshell) for this input. It will warn if the set -o pipefail is removed.
Is this correct behavior? The description of pipefail only seems to mention exit status of the pipeline, not scoping within.
#!/bin/bashset -o pipefail # SC will not warn if this is set
out=''echo hello |whileread -r i;do
out=$i# I expect SC2030 here, alwaysdoneecho"$out"# I expect SC2031 here, always
The text was updated successfully, but these errors were encountered:
On Sat, Feb 1, 2025 at 12:06 PM Mitchell Perilstein < ***@***.***> wrote:
Shellcheck 0.10.0 will not warn SC2030 and SC2031 for this input. It will
warn if the set -o pipefail is removed.
Is this correct behavior? The description of pipefail only seems to
mention exit status of the pipeline, not scoping within.
#!/bin/bash
set -o pipefail # SC will not warn about the subshell variable assignment if this is set
out=''echo hello | while read -r i; do
out=$idoneecho "$out"
—
Reply to this email directly, view it on GitHub
<#3134>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUF2F2Y4DLJXL4AQ2HGHMM32NUSOBAVCNFSM6AAAAABWJTLYRSVHI2DSMVQWIX3LMV43ASLTON2WKOZSHAZDKNBQGI2DAMQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
Shellcheck 0.10.0 will not warn SC2030 and SC2031 (variable assignment in a subshell) for this input. It will warn if the
set -o pipefail
is removed.Is this correct behavior? The description of
pipefail
only seems to mention exit status of the pipeline, not scoping within.The text was updated successfully, but these errors were encountered: