diff options
author | 2019-05-28 12:20:28 +0000 | |
---|---|---|
committer | 2019-05-28 12:20:28 +0000 | |
commit | 45fe34631843a227b3a10cfeba7bd352f377e249 (patch) | |
tree | 57ec2ff91f16581ea36c58161886366da6c8f9bb /usr.bin/tmux/cmd-source-file.c | |
parent | Allow source-file to take multiple arguments. (diff) | |
download | wireguard-openbsd-45fe34631843a227b3a10cfeba7bd352f377e249.tar.xz wireguard-openbsd-45fe34631843a227b3a10cfeba7bd352f377e249.zip |
Exit 1 correctly if source-file fails.
Diffstat (limited to 'usr.bin/tmux/cmd-source-file.c')
-rw-r--r-- | usr.bin/tmux/cmd-source-file.c | 4 |
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); } |