745c82534b
Traping INT just after lauch, even before requireing library should allow clean exits at all stages. Closes #44
18 lines
336 B
Ruby
Executable file
18 lines
336 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
|
|
trap('INT') do |status|
|
|
exit! 128+status
|
|
end
|
|
|
|
require 'mutant'
|
|
|
|
namespace =
|
|
if File.basename($0) == 'zombie'
|
|
$stderr.puts('Detected zombie environment...')
|
|
require File.expand_path('../../spec/support/zombie.rb', __FILE__)
|
|
Zombie.setup
|
|
else
|
|
Mutant
|
|
end
|
|
|
|
Kernel.exit(namespace::CLI.run(ARGV))
|