summaryrefslogtreecommitdiffstats
path: root/parser.y
diff options
context:
space:
mode:
authorNicolas Williams <nico@cryptonector.com>2014-08-06 17:50:28 -0500
committerNicolas Williams <nico@cryptonector.com>2014-08-06 17:51:53 -0500
commit0d437e25de7d14dc780fd152e86e0414a027a2f5 (patch)
tree243135d2bfed306c47f7029a7b57d224ba29142d /parser.y
parent6744664ff4ac54a3df68d14ffe3cd4f34fe7f42a (diff)
Better error msg for bad shell quoting (fix #538)
Diffstat (limited to 'parser.y')
-rw-r--r--parser.y10
1 files changed, 9 insertions, 1 deletions
diff --git a/parser.y b/parser.y
index 72e2b28f..7117b4ca 100644
--- a/parser.y
+++ b/parser.y
@@ -118,7 +118,15 @@ struct lexer_param {
void yyerror(YYLTYPE* loc, block* answer, int* errors,
struct locfile* locations, struct lexer_param* lexer_param_ptr, const char *s){
(*errors)++;
- locfile_locate(locations, *loc, "error: %s", s);
+ if (strstr(s, "unexpected")) {
+#ifdef WIN32
+ locfile_locate(locations, *loc, "error: %s (Windows cmd shell quoting issues?)", s);
+#else
+ locfile_locate(locations, *loc, "error: %s (Unix shell quoting issues?)", s);
+#endif
+ } else {
+ locfile_locate(locations, *loc, "error: %s", s);
+ }
}
int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, block* answer, int* errors,