Skip to content
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
2 changes: 2 additions & 0 deletions src/ShellCheck/Analytics.hs
Original file line number Diff line number Diff line change
Expand Up @@ -5097,6 +5097,8 @@ prop_checkOverwrittenExitCode5 = verify checkOverwrittenExitCode "x; if [ $? -eq
prop_checkOverwrittenExitCode6 = verify checkOverwrittenExitCode "x; [ $? -gt 0 ] && fail=$?"
prop_checkOverwrittenExitCode7 = verifyNot checkOverwrittenExitCode "[ 1 -eq 2 ]; status=$?"
prop_checkOverwrittenExitCode8 = verifyNot checkOverwrittenExitCode "[ 1 -eq 2 ]; exit $?"
prop_checkOverwrittenExitCode9 = verify checkOverwrittenExitCode "x; printf '%d' $?; [ $? -eq 0 ]"
prop_checkOverwrittenExitCode10 = verifyNot checkOverwrittenExitCode "read -r x; [ $? -eq 0 ]"
checkOverwrittenExitCode params t =
case t of
T_DollarBraced id _ val | getLiteralString val == Just "?" -> check id
Expand Down
2 changes: 1 addition & 1 deletion src/ShellCheck/CFG.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,7 @@ handleCommand cmd vars args literalCmd = do

linkRanges $ [args] ++ assignments ++ [exe] ++ dropAssignments

regularExpansionWithStatus vars args@(cmd NE.:| _) p = do
regularExpansionWithStatus vars args p = do
initial <- regularExpansion vars (NE.toList args) p
status <- newNodeRange $ CFSetExitCode (getId cmd)
linkRange initial status
Expand Down
Loading