mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-08-09 00:00:47 +08:00
Fix 'for file; do ..' counting $file as a safe variable.
This commit is contained in:
@@ -404,6 +404,7 @@ getModifiedVariables t =
|
||||
[(t, t, fromMaybe "COPROC" name, DataArray SourceInteger)]
|
||||
|
||||
--Points to 'for' rather than variable
|
||||
T_ForIn id str [] _ -> [(t, t, str, DataString $ SourceExternal)]
|
||||
T_ForIn id str words _ -> [(t, t, str, DataString $ SourceFrom words)]
|
||||
T_SelectIn id str words _ -> [(t, t, str, DataString $ SourceFrom words)]
|
||||
_ -> []
|
||||
|
Reference in New Issue
Block a user