mirror of
https://github.com/tmate-io/tmate.git
synced 2024-12-28 17:49:02 +01:00
Print %%error not %%end guard on error, from George Nachman.
This commit is contained in:
parent
43d904dbf3
commit
70397e4a95
@ -207,8 +207,12 @@ cmdq_continue(struct cmd_q *cmdq)
|
|||||||
if (guards)
|
if (guards)
|
||||||
cmdq_print(cmdq, "%%begin");
|
cmdq_print(cmdq, "%%begin");
|
||||||
retval = cmdq->cmd->entry->exec(cmdq->cmd, cmdq);
|
retval = cmdq->cmd->entry->exec(cmdq->cmd, cmdq);
|
||||||
if (guards)
|
if (guards) {
|
||||||
cmdq_print(cmdq, "%%end");
|
if (retval == CMD_RETURN_ERROR)
|
||||||
|
cmdq_print(cmdq, "%%error");
|
||||||
|
else
|
||||||
|
cmdq_print(cmdq, "%%end");
|
||||||
|
}
|
||||||
|
|
||||||
if (retval == CMD_RETURN_ERROR)
|
if (retval == CMD_RETURN_ERROR)
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user