Exit 1 correctly if source-file fails.

pull/1768/head
nicm 2019-05-28 12:20:28 +00:00
parent 0ec410689c
commit 299d4f3aaa
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}