From 115bb33257ece9eec1c890cc04683227678a895f Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 17 Mar 2020 11:10:12 +0000 Subject: Ignore default-shell (and use /bin/sh) if it invalid not just if it is tmux itself, also refuse to set the option to something invalid in the first place. GitHub issue 2120. --- spawn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'spawn.c') diff --git a/spawn.c b/spawn.c index 6bcea168..9d2ccdf1 100644 --- a/spawn.c +++ b/spawn.c @@ -320,7 +320,7 @@ spawn_pane(struct spawn_context *sc, char **cause) /* Then the shell. If respawning, use the old one. */ if (~sc->flags & SPAWN_RESPAWN) { tmp = options_get_string(s->options, "default-shell"); - if (*tmp == '\0' || areshell(tmp)) + if (!checkshell(tmp)) tmp = _PATH_BSHELL; free(new_wp->shell); new_wp->shell = xstrdup(tmp); -- cgit