Commit 758a3977 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd.exe: Add "if defined ..." support.

parent 953940aa
......@@ -472,6 +472,12 @@ char condition[MAX_PATH], *command, *s;
}
WCMD_parameter (p, 2+negate, &command);
}
else if (!lstrcmpi (condition, "defined")) {
if (GetEnvironmentVariableA(WCMD_parameter (p, 1+negate, NULL), NULL, 0) > 0) {
test = 1;
}
WCMD_parameter (p, 2+negate, &command);
}
else if ((s = strstr (p, "=="))) {
s += 2;
if (!lstrcmpi (condition, WCMD_parameter (s, 0, NULL))) test = 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment