aboutgitcodebugslistschat
path: root/pasta.c
diff options
context:
space:
mode:
Diffstat (limited to 'pasta.c')
-rw-r--r--pasta.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pasta.c b/pasta.c
index e233762..1dd8267 100644
--- a/pasta.c
+++ b/pasta.c
@@ -184,7 +184,7 @@ void pasta_start_ns(struct ctx *c, int argc, char *argv[])
struct pasta_setup_ns_arg arg = {
.argv = argv,
};
- char *shell = getenv("SHELL") ? getenv("SHELL") : "/bin/sh";
+ char *shell = getenv("SHELL");
char *sh_argv[] = { shell, NULL };
char *bash_argv[] = { shell, "-l", NULL };
char ns_fn_stack[NS_FN_STACK_SIZE];
@@ -193,6 +193,9 @@ void pasta_start_ns(struct ctx *c, int argc, char *argv[])
if (!c->debug)
c->quiet = 1;
+ if (!shell)
+ shell = "/bin/sh";
+
if (argc == 0) {
if (strstr(shell, "/bash")) {
arg.argv = bash_argv;