diff --git a/plugins/commands/cloud/version/release.rb b/plugins/commands/cloud/version/release.rb index 073e83f5b..eb7c16a73 100644 --- a/plugins/commands/cloud/version/release.rb +++ b/plugins/commands/cloud/version/release.rb @@ -18,9 +18,9 @@ module VagrantPlugins o.on("-u", "--username USERNAME_OR_EMAIL", String, "Vagrant Cloud username or email address") do |u| options[:username] = u end - options[:assume_yes] = false - o.on("-y", "--yes", "Automatic yes to prompts") do |y| - options[:assume_yes] = y + options[:force] = false + o.on("-f", "--force", "Release without confirmation") do |f| + options[:force] = f end end @@ -32,7 +32,7 @@ module VagrantPlugins help: opts.help.chomp end - if not options[:assume_yes] + if not options[:force] @env.ui.warn(I18n.t("cloud_command.version.release_warn", version: argv[1], box: argv.first)) cont = @env.ui.ask(I18n.t("cloud_command.continue")) return 1 if cont.strip.downcase != "y" diff --git a/test/unit/plugins/commands/cloud/version/release_test.rb b/test/unit/plugins/commands/cloud/version/release_test.rb index fde68cd4b..ac8f75c4e 100644 --- a/test/unit/plugins/commands/cloud/version/release_test.rb +++ b/test/unit/plugins/commands/cloud/version/release_test.rb @@ -67,7 +67,7 @@ describe VagrantPlugins::CloudCommand::VersionCommand::Command::Release do end context "non-interactive mode with arguments" do - let (:argv) { ["--yes", "vagrant/box-name", "1.0.0"] } + let (:argv) { ["--force", "vagrant/box-name", "1.0.0"] } it "releases a version" do allow(VagrantCloud::Version).to receive(:new).