@@ -26,7 +26,7 @@ pub fn main() !void {
2626
2727 if (args .len < 2 ) {
2828 try renderErrorMessage (stderr .writer (), stderr_config , .err , "expected zig lib dir as first argument" , .{});
29- std .os .exit (1 );
29+ std .process .exit (1 );
3030 }
3131 const zig_lib_dir = args [1 ];
3232 var cli_args = args [2.. ];
@@ -62,7 +62,7 @@ pub fn main() !void {
6262 var options = cli .parse (allocator , cli_args , & cli_diagnostics ) catch | err | switch (err ) {
6363 error .ParseError = > {
6464 try error_handler .emitCliDiagnostics (allocator , cli_args , & cli_diagnostics );
65- std .os .exit (1 );
65+ std .process .exit (1 );
6666 },
6767 else = > | e | return e ,
6868 };
@@ -117,7 +117,7 @@ pub fn main() !void {
117117 },
118118 }
119119 try error_handler .emitMessage (allocator , .note , "to disable auto includes, use the option /:auto-includes none" , .{});
120- std .os .exit (1 );
120+ std .process .exit (1 );
121121 },
122122 };
123123
@@ -153,16 +153,16 @@ pub fn main() !void {
153153 preprocess .preprocess (& comp , preprocessed_buf .writer (), argv .items , maybe_dependencies_list ) catch | err | switch (err ) {
154154 error .GeneratedSourceError = > {
155155 try error_handler .emitAroDiagnostics (allocator , "failed during preprocessor setup (this is always a bug):" , & comp );
156- std .os .exit (1 );
156+ std .process .exit (1 );
157157 },
158158 // ArgError can occur if e.g. the .rc file is not found
159159 error .ArgError , error .PreprocessError = > {
160160 try error_handler .emitAroDiagnostics (allocator , "failed during preprocessing:" , & comp );
161- std .os .exit (1 );
161+ std .process .exit (1 );
162162 },
163163 error .StreamTooLong = > {
164164 try error_handler .emitMessage (allocator , .err , "failed during preprocessing: maximum file size exceeded" , .{});
165- std .os .exit (1 );
165+ std .process .exit (1 );
166166 },
167167 error .OutOfMemory = > | e | return e ,
168168 };
@@ -171,7 +171,7 @@ pub fn main() !void {
171171 } else {
172172 break :full_input std .fs .cwd ().readFileAlloc (allocator , options .input_filename , std .math .maxInt (usize )) catch | err | {
173173 try error_handler .emitMessage (allocator , .err , "unable to read input file path '{s}': {s}" , .{ options .input_filename , @errorName (err ) });
174- std .os .exit (1 );
174+ std .process .exit (1 );
175175 };
176176 }
177177 };
@@ -191,14 +191,14 @@ pub fn main() !void {
191191 const final_input = removeComments (mapping_results .result , mapping_results .result , & mapping_results .mappings ) catch | err | switch (err ) {
192192 error .InvalidSourceMappingCollapse = > {
193193 try error_handler .emitMessage (allocator , .err , "failed during comment removal; this is a known bug" , .{});
194- std .os .exit (1 );
194+ std .process .exit (1 );
195195 },
196196 else = > | e | return e ,
197197 };
198198
199199 var output_file = std .fs .cwd ().createFile (options .output_filename , .{}) catch | err | {
200200 try error_handler .emitMessage (allocator , .err , "unable to create output file '{s}': {s}" , .{ options .output_filename , @errorName (err ) });
201- std .os .exit (1 );
201+ std .process .exit (1 );
202202 };
203203 var output_file_closed = false ;
204204 defer if (! output_file_closed ) output_file .close ();
@@ -231,7 +231,7 @@ pub fn main() !void {
231231 output_file_closed = true ;
232232 // Failing to delete is not really a big deal, so swallow any errors
233233 std .fs .cwd ().deleteFile (options .output_filename ) catch {};
234- std .os .exit (1 );
234+ std .process .exit (1 );
235235 },
236236 else = > | e | return e ,
237237 };
@@ -247,7 +247,7 @@ pub fn main() !void {
247247 if (options .depfile_path ) | depfile_path | {
248248 var depfile = std .fs .cwd ().createFile (depfile_path , .{}) catch | err | {
249249 try error_handler .emitMessage (allocator , .err , "unable to create depfile '{s}': {s}" , .{ depfile_path , @errorName (err ) });
250- std .os .exit (1 );
250+ std .process .exit (1 );
251251 };
252252 defer depfile .close ();
253253
0 commit comments