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
Here's a snippet or screenshot that shows the problem:
#! /bin/bash# shellcheck disable=SC2181 # (style): Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
[ $?-eq 0 ]
[ ${PIPESTATUS[0]}-eq 0 ]
Here's what shellcheck currently says:
Line 5 SC2086: Double quote to prevent globbing and word splitting.
Here's what I wanted or expected to see:
Nothing. Elements of the $PIPESTATUS array are numeric by definition. Just like $?, it doesn't need to doublequoted (at least not to prevent globbing and word splitting; you may want to quote it in case the particular element you're accessing is empty)
The text was updated successfully, but these errors were encountered:
For bugs
shellcheck --version
or 'online'): onlineFor new checks and feature suggestions
Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
Nothing. Elements of the$PIPESTATUS array are numeric by definition. Just like $ ?, it doesn't need to doublequoted (at least not to prevent globbing and word splitting; you may want to quote it in case the particular element you're accessing is empty)
The text was updated successfully, but these errors were encountered: