From 2cee19ab217968b50aa1be821a53693fc1537333 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Thu, 13 May 2021 20:08:35 -0700 Subject: [PATCH] CLI repl: "run" command handles cross compiled binaries with an appropriate error message, and does not terminate the repl. --- src/main.zig | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/main.zig b/src/main.zig index b55e9c9111..e2ec2fc1fc 100644 --- a/src/main.zig +++ b/src/main.zig @@ -2121,8 +2121,11 @@ fn runOrTest( if (!watch) return cleanExit(); return; }, - .run => fatal("unable to execute {s}: non-native", .{exe_path}), - else => unreachable, + else => { + std.log.err("unable to execute {s}: non-native", .{exe_path}); + if (!watch) process.exit(1); + return; + }, } } // when testing pass the zig_exe_path to argv