summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-source-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-source-file.c')
-rw-r--r--usr.bin/tmux/cmd-source-file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c
index 07fcffdee4d..a9ebd0c2261 100644
--- a/usr.bin/tmux/cmd-source-file.c
+++ b/usr.bin/tmux/cmd-source-file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-source-file.c,v 1.39 2019/05/28 11:46:30 nicm Exp $ */
+/* $OpenBSD: cmd-source-file.c,v 1.40 2019/05/28 12:20:28 nicm Exp $ */
/*
* Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org>
@@ -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);
}