mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-09 13:54:54 +02:00
Change nested check to compare server socket path rather than just assuming
that if $TMUX is set it is nested. From Micah Cowan.
This commit is contained in:
@ -693,17 +693,6 @@ server_client_msg_command(struct client *c, struct msg_command_data *data)
|
||||
}
|
||||
cmd_free_argv(argc, argv);
|
||||
|
||||
if (data->pid != -1) {
|
||||
TAILQ_FOREACH(cmd, cmdlist, qentry) {
|
||||
if (cmd->entry->flags & CMD_CANTNEST) {
|
||||
server_client_msg_error(&ctx,
|
||||
"sessions should be nested with care. "
|
||||
"unset $TMUX to force");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (cmd_list_exec(cmdlist, &ctx) != 1)
|
||||
server_write_client(c, MSG_EXIT, NULL, 0);
|
||||
cmd_list_free(cmdlist);
|
||||
|
Reference in New Issue
Block a user