Skip to content
Open
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions templates/Vagrantfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,11 @@ Vagrant.configure("2") do |c|
p.name = "kitchen-<%= File.basename(config[:kitchen_root]) %>-<%= instance.name %>-<%= SecureRandom.uuid %>"
<% end %>

<% case config[:provider]
when "tart" %>
Comment on lines 100 to +103
Copy link

Copilot AI Nov 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two separate case config[:provider] blocks setting p.name should be consolidated into a single case statement. This would improve code maintainability and follow the pattern used elsewhere in the file.

Consider merging them like this:

<% case config[:provider]
   when "virtualbox" %>
    p.name = "kitchen-<%= File.basename(config[:kitchen_root]) %>-<%= instance.name %>-<%= SecureRandom.uuid %>"
<% when "tart" %>
    p.name = "kitchen-<%= File.basename(config[:kitchen_root]) %>-<%= instance.name %>"
<% end %>
Suggested change
<% end %>
<% case config[:provider]
when "tart" %>
<% when "tart" %>

Copilot uses AI. Check for mistakes.
p.name = "kitchen-<%= File.basename(config[:kitchen_root]) %>-<%= instance.name %>"
<% end %>

<% case config[:provider]
when "virtualbox", /^vmware_/
if config[:gui] == true || config[:gui] == false %>
Expand Down
Loading