File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,8 @@ def out
330330 if Config [ 'auto_checkout' ]
331331 stopped = Timer . stop_all ( args [ '-a' ] ) . each do |checked_out_of |
332332 note = Timer . last_checkout . note
333- warn "Checked out of entry #{ note . inspect } in sheet #{ checked_out_of . sheet . inspect } ."
333+ entry = note_blank? ( note ) ? Timer . last_checkout . id : note . inspect
334+ warn "Checked out of entry #{ entry } in sheet #{ checked_out_of . sheet . inspect } ."
334335 end
335336 if stopped . empty?
336337 warn "No running entries to stop."
@@ -339,7 +340,8 @@ def out
339340 sheet = sheet_name_from_string ( unused_args )
340341 if Timer . stop sheet , args [ '-a' ]
341342 note = Timer . last_checkout . note
342- warn "Checked out of entry #{ note . inspect } in sheet #{ sheet . inspect } ."
343+ entry = note_blank? ( note ) ? Timer . last_checkout . id : note . inspect
344+ warn "Checked out of entry #{ entry } in sheet #{ sheet . inspect } ."
343345 else
344346 warn "No running entry on sheet #{ sheet . inspect } ."
345347 end
@@ -486,6 +488,10 @@ def month
486488
487489 private
488490
491+ def note_blank? ( note )
492+ note . inspect . to_s . gsub ( '"' , '' ) . strip . size . zero?
493+ end
494+
489495 def unused_args
490496 args . unused . join ( ' ' )
491497 end
You can’t perform that action at this time.
0 commit comments