From 992e0ff7e9a71a85a89d4fb7b4e6ace7ba74e2ba Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 29 Sep 2016 01:27:09 +0200 Subject: hush: fix ". EMPTY_LINE" not setting $? to 0 Signed-off-by: Denys Vlasenko --- shell/hush.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'shell/hush.c') diff --git a/shell/hush.c b/shell/hush.c index e2b0a15b8..5698de686 100644 --- a/shell/hush.c +++ b/shell/hush.c @@ -9156,6 +9156,8 @@ static int FAST_FUNC builtin_source(char **argv) if (argv[1]) save_and_replace_G_args(&sv, argv); + /* "false; . ./empty_line; echo Zero:$?" should print 0 */ + G.last_exitcode = 0; parse_and_run_file(input); fclose_and_forget(input); -- cgit v1.2.3