diff options
author | elijah <elijah@riseup.net> | 2015-01-28 13:41:12 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2015-01-28 13:41:12 -0800 |
commit | 5676272e90dc69234181eaa5b2e96447f904966e (patch) | |
tree | d5f909d1a1f5edf80af083048efe4b51ac8a6abd /lib/leap_cli/commands | |
parent | b3f186752b5279c8c7311c099bdf2bf19afb7434 (diff) |
honor --yes for 'db destroy'. closes 6649.
Diffstat (limited to 'lib/leap_cli/commands')
-rw-r--r-- | lib/leap_cli/commands/db.rb | 6 |
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'] |