mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2025-02-07 13:03:08 +00:00
(target_environment): Don't use shell_var if its `value' field is NULL.
This commit is contained in:
parent
2750526aa5
commit
8d5b3d4298
1 changed files with 12 additions and 9 deletions
|
@ -918,15 +918,18 @@ target_environment (struct file *file)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case v_noexport:
|
case v_noexport:
|
||||||
/* If this is the SHELL variable and it's not exported, then
|
|
||||||
add the value from our original environment. */
|
|
||||||
if (streq (v->name, "SHELL"))
|
|
||||||
{
|
{
|
||||||
|
/* If this is the SHELL variable and it's not exported,
|
||||||
|
then add the value from our original environment, if
|
||||||
|
the original environment defined a value for SHELL. */
|
||||||
extern struct variable shell_var;
|
extern struct variable shell_var;
|
||||||
|
if (streq (v->name, "SHELL") && shell_var.value)
|
||||||
|
{
|
||||||
v = &shell_var;
|
v = &shell_var;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
case v_ifset:
|
case v_ifset:
|
||||||
if (v->origin == o_default)
|
if (v->origin == o_default)
|
||||||
|
|
Loading…
Reference in a new issue