Skip to content

Update box add action to pass arch correctly #13699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

taru-garg-hashicorp
Copy link
Contributor

@taru-garg-hashicorp taru-garg-hashicorp commented Jul 31, 2025

Currently, during the box add action env[:architecture] gets passed down to add_direct, however, there is no architecture in env, the correct arch which is set in Vagrantfile is box_architecture, this PR changes the action to pass down the correct parameter

Closes: #13698, #13697

@taru-garg-hashicorp taru-garg-hashicorp requested a review from a team as a code owner July 31, 2025 08:12
…added from a file

test(action/box_add): Update tests to ensure box arch is passed down correctly
@taru-garg-hashicorp taru-garg-hashicorp force-pushed the taru-garg-hashicorp/test-bento branch from 480ed60 to 8ec3d69 Compare July 31, 2025 08:19
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug in the box add action where the wrong environment variable was being used to pass architecture information. The fix ensures that box_architecture (which is set in the Vagrantfile) is correctly passed to the add_direct method instead of the non-existent architecture variable.

  • Changes the architecture parameter from env[:architecture] to env[:box_architecture] in the add_direct method call
  • Adds test coverage to verify the architecture is correctly passed through to the box collection

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
lib/vagrant/action/builtin/box_add.rb Updates the add_direct method to use the correct box_architecture environment variable
test/unit/vagrant/action/builtin/box_add_test.rb Adds test coverage to verify architecture is properly passed to the box collection

Copy link
Member

@chrisroberts chrisroberts left a comment

Choose a reason for hiding this comment

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

👍

@taru-garg-hashicorp taru-garg-hashicorp merged commit df215db into hashicorp:main Jul 31, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vagrant box for vmware fusion doesn't come up and has an error
2 participants