Replace exit with std.process.exit

`std.os.exit` got removed in [cd62005](cd62005f19 (diff-4284cdf770ea88be46f4aab7f82ed3c58821e4b3433b7c6152278a9911348dc5))
This commit fixes this by replacing all `std.os.exit` calls with
`std.process.exit`.
This commit is contained in:
Froxcey 2024-03-25 15:02:40 +08:00
parent 0de6445539
commit 646c45ea65
No known key found for this signature in database
GPG Key ID: 621379E1D6250388
3 changed files with 4 additions and 4 deletions

View File

@ -51,7 +51,7 @@ pub fn main() !void {
run(allocator, options, writer) catch |err| { run(allocator, options, writer) catch |err| {
switch (err) { switch (err) {
error.JetzigCommandError => std.os.exit(1), error.JetzigCommandError => std.process.exit(1),
else => return err, else => return err,
} }
}; };

View File

@ -134,6 +134,6 @@ pub fn run(
} else { } else {
std.debug.print("Unable to locate compiled executable. Exiting.", .{}); std.debug.print("Unable to locate compiled executable. Exiting.", .{});
util.printFailure(); util.printFailure();
std.os.exit(1); std.process.exit(1);
} }
} }

View File

@ -72,7 +72,7 @@ pub fn run(
const exe_path = try util.locateExecutable(allocator, cwd, .{}); const exe_path = try util.locateExecutable(allocator, cwd, .{});
if (exe_path == null) { if (exe_path == null) {
std.debug.print("Unable to locate compiled executable. Exiting.\n", .{}); std.debug.print("Unable to locate compiled executable. Exiting.\n", .{});
std.os.exit(1); std.process.exit(1);
} }
const argv = &[_][]const u8{exe_path.?}; const argv = &[_][]const u8{exe_path.?};
@ -94,7 +94,7 @@ pub fn run(
if (!options.reload) { if (!options.reload) {
const term = try process.wait(); const term = try process.wait();
std.os.exit(term.Exited); std.process.exit(term.Exited);
} }
while (true) { while (true) {