Skip to content

Commit

Permalink
Get integer status code from Process::Status
Browse files Browse the repository at this point in the history
  • Loading branch information
joonty committed Mar 14, 2013
1 parent 81b6807 commit 01c58a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/breaktime/schedule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def start
def run_dialog
retcode_d = exec_self "dialog", :level => 'error'

case retcode_d
case retcode_d.to_i
when Breaktime::EX_OK
@log.info { "Taking a break..." }
retcode_i = exec_self "now", :level => 'error'
if retcode_i == 0
if retcode_i.to_i == 0
@log.info { "Command returned" }
else
@log.error { "Failed to run breaktime with the `now` mode" }
Expand Down

0 comments on commit 01c58a0

Please sign in to comment.