diff options
Diffstat (limited to 'src/actions.c')
-rw-r--r-- | src/actions.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/actions.c b/src/actions.c index 8f57d7c..216432c 100644 --- a/src/actions.c +++ b/src/actions.c @@ -3743,7 +3743,10 @@ cmd_getenv (int interactive, struct cmdarg **args) char *value; value = getenv (ARG_STRING(0)); - return cmdret_new (RET_SUCCESS, "%s", value); + if (value) + return cmdret_new (RET_SUCCESS, "%s", value); + else + return cmdret_new (RET_SUCCESS, ""); } /* Thanks to Gergely Nagy <algernon@debian.org> for the original |