lib/gizzard/commands.rb in gizzmo-0.2.0 vs lib/gizzard/commands.rb in gizzmo-0.2.1

- old
+ new

@@ -76,15 +76,19 @@ end end class ReloadCommand < Command def run - puts "Are you sure? Reloading will affect production services immediately! (Type 'yes')" - if gets.chomp == "yes" + if global_options.force || ask service.reload_forwardings else STDERR.puts "aborted" end + end + + def ask + puts "Are you sure? Reloading will affect production services immediately! (Type 'yes')" + gets.chomp == "yes" end end class DeleteCommand < Command def run \ No newline at end of file