Skip to content

Commit

Permalink
add provider to update and prune commands (#481)
Browse files Browse the repository at this point in the history
This is required if you have multiple boxes of the same name from multiple providers such as virtualbox and parallels. Without the provider flag it throws an error not knowing which one to update or prune. Adding the flag doesn't change original behavior either.

Signed-off-by: Corey Hemminger <[email protected]>

Signed-off-by: Corey Hemminger <[email protected]>
  • Loading branch information
Stromweld authored Dec 13, 2022
1 parent 192c5c8 commit 8a49456
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/kitchen/driver/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,14 +313,14 @@ def finalize_ca_cert!
def finalize_box_auto_update!
return if config[:box_auto_update].nil?

config[:box_auto_update] = "vagrant box update #{"--insecure " if config[:box_download_insecure]}--box #{config[:box]}"
config[:box_auto_update] = "vagrant box update #{"--insecure " if config[:box_download_insecure]}--box #{config[:box]} --provider #{config[:provider]}"
end

# Create vagrant command to remove older versions of the box
def finalize_box_auto_prune!
return if config[:box_auto_prune].nil?

config[:box_auto_prune] = "vagrant box prune --keep-active-boxes --name #{config[:box]}"
config[:box_auto_prune] = "vagrant box prune --keep-active-boxes --name #{config[:box]} --provider #{config[:provider]}"
end

# Replaces any `{{vagrant_root}}` tokens in the pre create command.
Expand Down

0 comments on commit 8a49456

Please sign in to comment.