Add check if variable exists
This commit is contained in:
parent
55616d1fb3
commit
0edcd01321
|
@ -79,8 +79,11 @@ int parse_command(char **command, int status) {
|
|||
char status_string[256]; // FIXME
|
||||
sprintf(status_string, "%d", status);
|
||||
command[i] = status_string;
|
||||
} else
|
||||
} else {
|
||||
command[i] = getenv(command[i]);
|
||||
if (command[i] == NULL)
|
||||
command[i] = "";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue