From a10b9245708ea781997cee932948d626920a0242 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Mon, 3 Jul 2017 10:44:09 -0700 Subject: [PATCH] Mention correct operator when warning about spaces around += (#944) --- ShellCheck/Parser.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ShellCheck/Parser.hs b/ShellCheck/Parser.hs index fb198f5..cd2c447 100644 --- a/ShellCheck/Parser.hs +++ b/ShellCheck/Parser.hs @@ -2443,7 +2443,11 @@ readAssignmentWordExt lenient = try $ do return $ T_Assignment id op variable indices value else do when (hasLeftSpace || hasRightSpace) $ - parseNoteAt pos ErrorC 1068 "Don't put spaces around the = in assignments." + parseNoteAt pos ErrorC 1068 $ + "Don't put spaces around the " + ++ if op == Append + then "+= when appending." + else "= in assignments." value <- readArray <|> readNormalWord spacing return $ T_Assignment id op variable indices value