Cli: Add zig compiler color

The compiler doesn't pass color to the parent process unless it is
called with `--colour on`. This commit adds those arguments to add
support for coloring in compiler outputs.
This commit is contained in:
Froxcey 2024-03-25 15:27:05 +08:00
parent 646c45ea65
commit 19c04f1482
No known key found for this signature in database
GPG Key ID: 621379E1D6250388
2 changed files with 3 additions and 2 deletions

View File

@ -62,7 +62,7 @@ pub fn run(
var install_argv = std.ArrayList([]const u8).init(allocator);
defer install_argv.deinit();
try install_argv.appendSlice(&[_][]const u8{ "zig", "build" });
try install_argv.appendSlice(&[_][]const u8{ "zig", "build", "--color", "on" });
switch (builtin.os.tag) {
.windows => try tar_argv.appendSlice(&[_][]const u8{

View File

@ -63,10 +63,11 @@ pub fn run(
);
while (true) {
// TODO: Catch this error instead of propagating
try util.runCommand(
allocator,
realpath,
&[_][]const u8{ "zig", "build", "-Djetzig_runner=true", "install" },
&[_][]const u8{ "zig", "build", "-Djetzig_runner=true", "install", "--color", "on" },
);
const exe_path = try util.locateExecutable(allocator, cwd, .{});