From c6070c69db7615c60190f8b5d0ec1786c2f241ff Mon Sep 17 00:00:00 2001 From: sophia Date: Wed, 20 Oct 2021 16:18:17 -0500 Subject: [PATCH] Rename cap command 'target' to 'target-guest' the target name is already used by the go cli --- plugins/commands/cap/command.rb | 7 ++++--- test/unit/plugins/commands/cap/command_test.rb | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/commands/cap/command.rb b/plugins/commands/cap/command.rb index 50803b2b9..4a8121cd0 100644 --- a/plugins/commands/cap/command.rb +++ b/plugins/commands/cap/command.rb @@ -28,9 +28,10 @@ module VagrantPlugins options[:check] = f end - # o.on("-t", "--target=TARGET", "Target guest to run against (if applicable)") do |t| - # options[:target] = t - # end + # TODO: Rename this back to `target` to maintain api + o.on("-t", "--target-guest=TARGET", "Target guest to run against (if applicable)") do |t| + options[:target] = t + end end # Parse the options diff --git a/test/unit/plugins/commands/cap/command_test.rb b/test/unit/plugins/commands/cap/command_test.rb index acb32f5ad..919485efd 100644 --- a/test/unit/plugins/commands/cap/command_test.rb +++ b/test/unit/plugins/commands/cap/command_test.rb @@ -49,7 +49,7 @@ describe VagrantPlugins::CommandCap::Command do end context "runs against target vm" do - let(:argv) { ["provider", "foo", "--target=dummy"] } + let(:argv) { ["provider", "foo", "--target-guest=dummy"] } let(:cap) { Class.new do def self.foo(m)