summaryrefslogtreecommitdiff
path: root/lib/leap_cli/commands
diff options
context:
space:
mode:
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r--lib/leap_cli/commands/db.rb6
1 files changed, 4 insertions, 2 deletions
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']