lib/leftovers/rake_task.rb in leftovers-0.2.3 vs lib/leftovers/rake_task.rb in leftovers-0.3.0
- old
+ new
@@ -47,12 +47,12 @@
def write_cli_cmd(argv)
$stdout.puts("\e[2mleftovers #{escaped_argv(argv)}\e[0m")
end
def run(argv)
- Leftovers::CLI.new(argv: argv)
- rescue SystemExit => e
- raise unless e.status == 0
+ exitstatus = Leftovers::CLI.new(argv: argv).run
+
+ exit exitstatus unless exitstatus == 0
end
def argv_or_default(task_argv)
task_argv = task_argv.to_a.compact
task_argv.empty? ? @default_argv : task_argv