showenv and setenv need to be CANFAIL.

This commit is contained in:
nicm
2015-12-16 21:47:00 +00:00
parent 909b737289
commit 8eb1a7d5dc
2 changed files with 3 additions and 3 deletions

View File

@ -94,7 +94,7 @@ cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq)
struct environ *env;
struct environ_entry *envent;
if (args_has(self->args, 'g'))
if (args_has(self->args, 'g') || cmdq->state.tflag.s == NULL)
env = global_environ;
else
env = cmdq->state.tflag.s->environ;