authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-24 20:07:42-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-29 23:50:20-07:00
log56db3dd85f794803f462cffc38225a67a27401cc
tree23bc811ef6add19a4b39b35fd38a6f1cf55fb54b
parenta93d855a0f0d61e57142cee0e1c4b5de8c083cc2

Maker: convert some process exits to error codes


1 files changed, 4 insertions(+), 4 deletions(-)

lib/compiler/Maker.zig+4-4
...@@ -908,7 +908,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {...@@ -908,7 +908,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {
908 try group.await(io);908 try group.await(io);
909909
910 for (options.forks) |*fork| {910 for (options.forks) |*fork| {
911 if (fork.failed) process.exit(1);911 if (fork.failed) return error.AlreadyReported;
912 try fork_set.put(arena, .{912 try fork_set.put(arena, .{
913 .path = fork.path,913 .path = fork.path,
914 .manifest_ast = fork.manifest_ast,914 .manifest_ast = fork.manifest_ast,
...@@ -1086,7 +1086,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {...@@ -1086,7 +1086,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {
1086 });1086 });
1087 }1087 }
1088 }1088 }
1089 if (any_unused) process.exit(1);1089 if (any_unused) return error.FailedButCacheIntact;
1090 }1090 }
10911091
1092 try job_queue.consolidateErrors();1092 try job_queue.consolidateErrors();
...@@ -1293,7 +1293,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {...@@ -1293,7 +1293,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {
1293 }1293 }
1294 try unlazy_set.put(arena, .fromSlice(hash), {});1294 try unlazy_set.put(arena, .fromSlice(hash), {});
1295 }1295 }
1296 if (any_errors) process.exit(1);1296 if (any_errors) return error.FailedButCacheIntact;
1297 if (options.system_pkg_dir_path) |p| {1297 if (options.system_pkg_dir_path) |p| {
1298 // In this mode, the system needs to provide these packages; they1298 // In this mode, the system needs to provide these packages; they
1299 // cannot be fetched by Zig.1299 // cannot be fetched by Zig.
...@@ -1303,7 +1303,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {...@@ -1303,7 +1303,7 @@ fn configure(graph: *Graph, options: ConfigureOptions) !ScannedConfig {
1303 }1303 }
1304 log.info("remote package fetching disabled due to --system mode", .{});1304 log.info("remote package fetching disabled due to --system mode", .{});
1305 log.info("dependencies might be avoidable depending on build configuration", .{});1305 log.info("dependencies might be avoidable depending on build configuration", .{});
1306 process.exit(1);1306 return error.FailedButCacheIntact;
1307 }1307 }
1308 continue :cp;1308 continue :cp;
1309 }1309 }