From 299d4f3aaa801ee79920fadcb802ca51b0d639ec Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 28 May 2019 12:20:28 +0000 Subject: Exit 1 correctly if source-file fails. --- cmd-source-file.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd-source-file.c') diff --git a/cmd-source-file.c b/cmd-source-file.c index a22c38e6..d88f74cf 100644 --- a/cmd-source-file.c +++ b/cmd-source-file.c @@ -96,6 +96,8 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item) globfree(&g); } if (cfg_finished) { + if (retval == CMD_RETURN_ERROR && c->session == NULL) + c->retval = 1; new_item = cmdq_get_callback(cmd_source_file_done, NULL); cmdq_insert_after(item, new_item); } -- cgit