Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
init: fix --force and pre-releases installed case
When packer init is invoked with a --force argument, but no --update, we clamp the version to install based on the last one locally installed. Doing this may however cause the constraint to always be false if the latest available version of a plugin is a pre-release, as none of the upstream constraints will match that. Therefore this commit changes how the constraint is derived from the local list of installations, so that only the last installation that matches the original constraint will be used, and not a pre-release.
- Loading branch information