Fix broken $() substitution in command files.
This commit is contained in:
parent
b1dc84ccd1
commit
8d65d0735a
|
|
@ -49,12 +49,13 @@ char* substitutions(const char*str)
|
||||||
str = ep + 1;
|
str = ep + 1;
|
||||||
|
|
||||||
value = getenv(name);
|
value = getenv(name);
|
||||||
if (value == 0)
|
if (value == 0) {
|
||||||
fprintf(stderr, "Warning: environment variable "
|
fprintf(stderr, "Warning: environment variable "
|
||||||
"\"%s\" not found during command file "
|
"\"%s\" not found during command file "
|
||||||
"processing.\n", name);
|
"processing.\n", name);
|
||||||
free(name);
|
free(name);
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
free(name);
|
free(name);
|
||||||
|
|
||||||
if (strlen(value) >= (nbuf - (cp-buf))) {
|
if (strlen(value) >= (nbuf - (cp-buf))) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue