authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-13 20:08:35-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2021-05-13 20:08:35-07:00
log2cee19ab217968b50aa1be821a53693fc1537333
treea2631684c457060d41cf93e83f80b189fb327173
parenta854795f5247538577507105396859f43b90283b

CLI repl: "run" command handles cross compiled binaries

with an appropriate error message, and does not terminate the repl.

1 files changed, 5 insertions(+), 2 deletions(-)

src/main.zig+5-2
...@@ -2121,8 +2121,11 @@ fn runOrTest(...@@ -2121,8 +2121,11 @@ fn runOrTest(
2121 if (!watch) return cleanExit();2121 if (!watch) return cleanExit();
2122 return;2122 return;
2123 },2123 },
2124 .run => fatal("unable to execute {s}: non-native", .{exe_path}),2124 else => {
2125 else => unreachable,2125 std.log.err("unable to execute {s}: non-native", .{exe_path});
2126 if (!watch) process.exit(1);
2127 return;
2128 },
2126 }2129 }
2127 }2130 }
2128 // when testing pass the zig_exe_path to argv2131 // when testing pass the zig_exe_path to argv