Skip to content
Permalink
Browse files Browse the repository at this point in the history
parse: Check for non-empty command/rspfile/rspfile_content
This matches ninja behavior and prevents the possibility of a rule
with an empty (NULL) command string.

Fixes #68.
  • Loading branch information
michaelforney committed Apr 4, 2021
1 parent 27dde2e commit d2af3bc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions parse.c
Expand Up @@ -42,6 +42,8 @@ parserule(struct scanner *s, struct environment *env)
var = scanname(s);
parselet(s, &val);
ruleaddvar(r, var, val);
if (!val)
continue;
if (strcmp(var, "command") == 0)
hascommand = true;
else if (strcmp(var, "rspfile") == 0)
Expand Down

0 comments on commit d2af3bc

Please sign in to comment.