From 5676272e90dc69234181eaa5b2e96447f904966e Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 28 Jan 2015 13:41:12 -0800 Subject: honor --yes for 'db destroy'. closes 6649. --- lib/leap_cli/commands/db.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/leap_cli/commands/db.rb') diff --git a/lib/leap_cli/commands/db.rb b/lib/leap_cli/commands/db.rb index fd50424..3502d7e 100644 --- a/lib/leap_cli/commands/db.rb +++ b/lib/leap_cli/commands/db.rb @@ -6,8 +6,10 @@ module LeapCli; module Commands db.arg_name 'FILTER', :optional => true db.command :destroy do |destroy| destroy.action do |global_options,options,args| - say 'You are about to permanently destroy all database data.' - return unless agree("Continue? ") + unless global_options[:yes] + say 'You are about to permanently destroy all database data.' + bail! unless agree("Continue? ") + end nodes = manager.filter(args) if nodes.any? nodes = nodes[:services => 'couchdb'] -- cgit v1.2.3