diff options
author | Nicolas Williams <nico@cryptonector.com> | 2014-08-06 17:50:28 -0500 |
---|---|---|
committer | Nicolas Williams <nico@cryptonector.com> | 2014-08-06 17:51:53 -0500 |
commit | 0d437e25de7d14dc780fd152e86e0414a027a2f5 (patch) | |
tree | 243135d2bfed306c47f7029a7b57d224ba29142d /parser.y | |
parent | 6744664ff4ac54a3df68d14ffe3cd4f34fe7f42a (diff) |
Better error msg for bad shell quoting (fix #538)
Diffstat (limited to 'parser.y')
-rw-r--r-- | parser.y | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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, |