Skip to content

Commit

Permalink
Fix bug in info command for cron: lastScheduleTime can be nil
Browse files Browse the repository at this point in the history
  • Loading branch information
collimarco committed Nov 3, 2022
1 parent 3d47f85 commit 271d464
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cuber/commands/info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def print_cron
schedule = cron['spec']['schedule']
command = cron['spec']['jobTemplate']['spec']['template']['spec']['containers'][0]['command'].shelljoin
last = cron['status']['lastScheduleTime']
puts "#{name}: #{schedule} #{command} (#{time_ago_in_words last})"
puts "#{name}: #{schedule} #{command} #{'(' + time_ago_in_words(last) + ')' if last}"
end
end

Expand Down

0 comments on commit 271d464

Please sign in to comment.