@@ -277,35 +277,33 @@ class Crystal::Command
277277 private def execute (output_filename , run_args , compiler , * , error_on_exit = false )
278278 time = @time && ! @progress_tracker .stats?
279279 status, elapsed_time = @progress_tracker .stage(" Execute" ) do
280- begin
281- elapsed = Time .measure do
282- Process .run(output_filename, args: run_args, input: Process ::Redirect ::Inherit , output: Process ::Redirect ::Inherit , error: Process ::Redirect ::Inherit ) do |process |
283- {% unless flag?(:wasm32 ) % }
284- # Ignore the signal so we don't exit the running process
285- # (the running process can still handle this signal)
286- Process .ignore_interrupts!
287- {% end % }
288- end
280+ elapsed = Time .measure do
281+ Process .run(output_filename, args: run_args, input: Process ::Redirect ::Inherit , output: Process ::Redirect ::Inherit , error: Process ::Redirect ::Inherit ) do |process |
282+ {% unless flag?(:wasm32 ) % }
283+ # Ignore the signal so we don't exit the running process
284+ # (the running process can still handle this signal)
285+ Process .ignore_interrupts!
286+ {% end % }
289287 end
290- {$? , elapsed}
291- ensure
292- File .delete?(output_filename)
293-
294- # Delete related PDB generated by MSVC, if any exist
295- {% if flag?(:msvc ) % }
296- unless compiler.debug.none?
297- basename = output_filename.rchop(" .exe" )
298- File .delete?(" #{ basename } .pdb" )
299- end
300- {% end % }
301-
302- # Delete related dwarf generated by dsymutil, if any exist
303- {% if flag?(:darwin ) % }
304- unless compiler.debug.none?
305- File .delete?(" #{ output_filename } .dwarf" )
306- end
307- {% end % }
308288 end
289+ {$? , elapsed}
290+ ensure
291+ File .delete?(output_filename)
292+
293+ # Delete related PDB generated by MSVC, if any exist
294+ {% if flag?(:msvc ) % }
295+ unless compiler.debug.none?
296+ basename = output_filename.rchop(" .exe" )
297+ File .delete?(" #{ basename } .pdb" )
298+ end
299+ {% end % }
300+
301+ # Delete related dwarf generated by dsymutil, if any exist
302+ {% if flag?(:darwin ) % }
303+ unless compiler.debug.none?
304+ File .delete?(" #{ output_filename } .dwarf" )
305+ end
306+ {% end % }
309307 end
310308
311309 if time
0 commit comments