@@ -26,7 +26,7 @@ pub fn main() !void {
26
26
27
27
if (args .len < 2 ) {
28
28
try renderErrorMessage (stderr .writer (), stderr_config , .err , "expected zig lib dir as first argument" , .{});
29
- std .os .exit (1 );
29
+ std .process .exit (1 );
30
30
}
31
31
const zig_lib_dir = args [1 ];
32
32
var cli_args = args [2.. ];
@@ -62,7 +62,7 @@ pub fn main() !void {
62
62
var options = cli .parse (allocator , cli_args , & cli_diagnostics ) catch | err | switch (err ) {
63
63
error .ParseError = > {
64
64
try error_handler .emitCliDiagnostics (allocator , cli_args , & cli_diagnostics );
65
- std .os .exit (1 );
65
+ std .process .exit (1 );
66
66
},
67
67
else = > | e | return e ,
68
68
};
@@ -117,7 +117,7 @@ pub fn main() !void {
117
117
},
118
118
}
119
119
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 );
121
121
},
122
122
};
123
123
@@ -153,16 +153,16 @@ pub fn main() !void {
153
153
preprocess .preprocess (& comp , preprocessed_buf .writer (), argv .items , maybe_dependencies_list ) catch | err | switch (err ) {
154
154
error .GeneratedSourceError = > {
155
155
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 );
157
157
},
158
158
// ArgError can occur if e.g. the .rc file is not found
159
159
error .ArgError , error .PreprocessError = > {
160
160
try error_handler .emitAroDiagnostics (allocator , "failed during preprocessing:" , & comp );
161
- std .os .exit (1 );
161
+ std .process .exit (1 );
162
162
},
163
163
error .StreamTooLong = > {
164
164
try error_handler .emitMessage (allocator , .err , "failed during preprocessing: maximum file size exceeded" , .{});
165
- std .os .exit (1 );
165
+ std .process .exit (1 );
166
166
},
167
167
error .OutOfMemory = > | e | return e ,
168
168
};
@@ -171,7 +171,7 @@ pub fn main() !void {
171
171
} else {
172
172
break :full_input std .fs .cwd ().readFileAlloc (allocator , options .input_filename , std .math .maxInt (usize )) catch | err | {
173
173
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 );
175
175
};
176
176
}
177
177
};
@@ -191,14 +191,14 @@ pub fn main() !void {
191
191
const final_input = removeComments (mapping_results .result , mapping_results .result , & mapping_results .mappings ) catch | err | switch (err ) {
192
192
error .InvalidSourceMappingCollapse = > {
193
193
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 );
195
195
},
196
196
else = > | e | return e ,
197
197
};
198
198
199
199
var output_file = std .fs .cwd ().createFile (options .output_filename , .{}) catch | err | {
200
200
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 );
202
202
};
203
203
var output_file_closed = false ;
204
204
defer if (! output_file_closed ) output_file .close ();
@@ -231,7 +231,7 @@ pub fn main() !void {
231
231
output_file_closed = true ;
232
232
// Failing to delete is not really a big deal, so swallow any errors
233
233
std .fs .cwd ().deleteFile (options .output_filename ) catch {};
234
- std .os .exit (1 );
234
+ std .process .exit (1 );
235
235
},
236
236
else = > | e | return e ,
237
237
};
@@ -247,7 +247,7 @@ pub fn main() !void {
247
247
if (options .depfile_path ) | depfile_path | {
248
248
var depfile = std .fs .cwd ().createFile (depfile_path , .{}) catch | err | {
249
249
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 );
251
251
};
252
252
defer depfile .close ();
253
253
0 commit comments