Skip to content

Commit 9e5cb09

Browse files
committed
show the correct executable path when zig env failed
1 parent 975cca8 commit 9e5cb09

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/main.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,14 @@ fn initConfig(allocator: std.mem.Allocator, env_map: std.process.EnvMap, arg_it:
149149
.allocator = allocator,
150150
.argv = &.{ zig_path, "env" },
151151
}) catch |err| {
152-
std.process.fatal("failed to run '{s} env' command: {}", .{ zls_path, err });
152+
std.process.fatal("failed to run '{s} env' command: {}", .{ zig_path, err });
153153
};
154154
defer allocator.free(result.stdout);
155155
defer allocator.free(result.stderr);
156156

157157
switch (result.term) {
158-
.Exited => |code| if (code != 0) fatal("command '{s} env' exited with non zero exit code: {d}", .{ zls_path, code }),
159-
else => fatal("command '{s} env' exited abnormally: {s}", .{ zls_path, @tagName(result.term) }),
158+
.Exited => |code| if (code != 0) fatal("command '{s} env' exited with non zero exit code: {d}", .{ zig_path, code }),
159+
else => fatal("command '{s} env' exited abnormally: {s}", .{ zig_path, @tagName(result.term) }),
160160
}
161161

162162
if (std.mem.startsWith(u8, result.stdout, "{")) {

0 commit comments

Comments
 (0)