Skip to content
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

command: support local paths for plugins remove #12886

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

lbajolet-hashicorp
Copy link
Contributor

@lbajolet-hashicorp lbajolet-hashicorp commented Mar 13, 2024

The packer plugins remove command allows users to delete plugins installed locally.

Previous versions of the command only allowed for the plugins to be removed using the source for a plugin, and the versions to remove, optionally.

This commit adds the capability for the plugins to be removed using their local path, in addition to the regular source+version method, that way we are able to pipe the results of `packer plugins installed' into the plugins remove command for quick plugin removal.

Related: #12321

Copy link
Contributor

@nywilken nywilken left a comment

Choose a reason for hiding this comment

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

Overall this looks good to me. I left a few suggestions.

~>  packer plugin installed | xargs -n1 -I{} packer plugins remove {}
/Users/dev/.packer.d/plugins/github.com/hashicorp/amazon/packer-plugin-amazon_v1.3.1_x5.0_darwin_arm64
/Users/dev/.packer.d/plugins/github.com/hashicorp/docker/packer-plugin-docker_v1.0.9_x5.0_darwin_arm64
/Users/dev/.packer.d/plugins/github.com/hashicorp/qemu/packer-plugin-qemu_v1.0.10_x5.0_darwin_arm64

command/plugins_remove.go Outdated Show resolved Hide resolved
command/plugins_remove.go Outdated Show resolved Hide resolved
The packer plugins remove command allows users to delete plugins
installed locally.

Previous versions of the command only allowed for the plugins to be
removed using the source for a plugin, and the versions to remove,
optionally.

This commit adds the capability for the plugins to be removed using
their local path, in addition to the regular source+version method, that
way we are able to pipe the results of `packer plugins installed' into
the plugins remove command for quick plugin removal.
@lbajolet-hashicorp lbajolet-hashicorp force-pushed the plugins_remove_local_path_support branch from ceebd32 to 7e913c2 Compare March 14, 2024 21:19
@lbajolet-hashicorp lbajolet-hashicorp merged commit 930b6c3 into main Mar 15, 2024
11 checks passed
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants