Added more helpful message for 'if [ grep .. ]'
This commit is contained in:
parent
7025ebd633
commit
34690ad3db
|
@ -166,7 +166,7 @@ readConditionContents single = do
|
||||||
readCondContents `attempting` (lookAhead $ do
|
readCondContents `attempting` (lookAhead $ do
|
||||||
pos <- getPosition
|
pos <- getPosition
|
||||||
choice (map (try . string) commonCommands)
|
choice (map (try . string) commonCommands)
|
||||||
parseProblemAt pos WarningC "To check a command, skip [] and just do 'if foo | grep bar; then'.")
|
parseProblemAt pos WarningC "Use 'if cmd; then ..' to check exit code, or 'if [[ $(cmd) == .. ]]' to check output.")
|
||||||
|
|
||||||
where
|
where
|
||||||
typ = if single then SingleBracket else DoubleBracket
|
typ = if single then SingleBracket else DoubleBracket
|
||||||
|
|
Loading…
Reference in New Issue