Better error msg for bad shell quoting (fix #538)
This commit is contained in:
1 parent
6744664ff4
commit
0d437e25de
1 file changed
+9
-1
@@ -118,7 +118,15 @@ struct lexer_param {
|
|||||||
void yyerror(YYLTYPE* loc, block* answer, int* errors,
|
void yyerror(YYLTYPE* loc, block* answer, int* errors,
|
||||||
struct locfile* locations, struct lexer_param* lexer_param_ptr, const char *s){
|
struct locfile* locations, struct lexer_param* lexer_param_ptr, const char *s){
|
||||||
(*errors)++;
|
(*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,
|
int yylex(YYSTYPE* yylval, YYLTYPE* yylloc, block* answer, int* errors,
|
||||||
|
|||||||
Reference in new issue
Block a user