From 445885536483e4e9d633344d66be7a041979c6f7 Mon Sep 17 00:00:00 2001 From: Elan Meng Date: Thu, 19 Nov 2009 13:16:47 +0800 Subject: [PATCH] ad default code, Jruby sucks --- bin/whenever | 2 +- lib/whenever/command_line.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/whenever b/bin/whenever index 06372c3..d221e10 100644 --- a/bin/whenever +++ b/bin/whenever @@ -10,7 +10,7 @@ options = Hash.new OptionParser.new do |opts| opts.banner = "Usage: whenever [options]" - opts.on('-v', '--version') { puts "Whenever v#{Whenever::VERSION}"; exit } + opts.on('-v', '--version') { puts "Whenever v#{Whenever::VERSION}"; exit(0) } opts.on('-w', '--write-crontab') { options[:write] = true } opts.on('-i', '--update-crontab [identifier]', 'Default: full path to schedule.rb file') do |identifier| options[:update] = true diff --git a/lib/whenever/command_line.rb b/lib/whenever/command_line.rb index 63a3ba3..76cbd1e 100644 --- a/lib/whenever/command_line.rb +++ b/lib/whenever/command_line.rb @@ -29,7 +29,7 @@ module Whenever write_crontab(whenever_cron) else puts Whenever.cron(@options) - exit + exit(0) end end @@ -67,7 +67,7 @@ module Whenever action = 'written' if @options[:write] action = 'updated' if @options[:update] puts "[write] crontab file #{action}" - exit + exit(0) else warn "[fail] Couldn't write crontab; try running `whenever' with no options to ensure your schedule file is valid." exit(1)