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

Skip invalid semantic versions in HashiCorp provider #40

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

sirlatrom
Copy link
Collaborator

@sirlatrom sirlatrom commented Nov 10, 2020

Closes #38.

Sample output (with --force as I already have it installed):

$ ./bin install --force https://releases.hashicorp.com/vault
   • Starting download of https://releases.hashicorp.com/vault/1.5.5/vault_1.5.5_linux_amd64.zip
48.85 MiB / 48.85 MiB [--------------------------------------------------------------------------------------------------------------------------------] 100.00% 55.90 MiB p/s 1s
   • Copying for vault@1.5.5 into /home/<redacted>/bin/vault
   • Done installing vault 1.5.5

With --debug to show messages about invalid semantic versions:

$ ./bin --debug install --force https://releases.hashicorp.com/vault
   • debug logs enabled       
   • Download path set to /home/<redacted>/bin
   • Getting latest release for vault
   • unable to parse "1.4.5.1+ent" as a semantic version: strconv.ParseInt: parsing "5.1": invalid syntax
   • unable to parse "1.4.7.1+ent.hsm" as a semantic version: strconv.ParseInt: parsing "7.1": invalid syntax
   • unable to parse "1.3.9.1+ent.hsm" as a semantic version: strconv.ParseInt: parsing "9.1": invalid syntax
   • unable to parse "1.3.9.1+ent" as a semantic version: strconv.ParseInt: parsing "9.1": invalid syntax
   • unable to parse "1.5.2.1+ent.hsm" as a semantic version: strconv.ParseInt: parsing "2.1": invalid syntax
   • unable to parse "1.5.2.1+ent" as a semantic version: strconv.ParseInt: parsing "2.1": invalid syntax
   • unable to parse "1.2.6.1+ent.hsm" as a semantic version: strconv.ParseInt: parsing "6.1": invalid syntax
   • unable to parse "1.2.6.1+ent" as a semantic version: strconv.ParseInt: parsing "6.1": invalid syntax
   • unable to parse "1.4.7.1+ent" as a semantic version: strconv.ParseInt: parsing "7.1": invalid syntax
   • unable to parse "1.4.5.1+ent.hsm" as a semantic version: strconv.ParseInt: parsing "5.1": invalid syntax
   • Removing vault_1.5.5_windows_amd64.zip with score 22 lower than 42
   • Removing vault_1.5.5_windows_386.zip with score 2 lower than 42
   • Removing vault_1.5.5_solaris_amd64.zip with score 22 lower than 42
   • Removing vault_1.5.5_openbsd_amd64.zip with score 22 lower than 42
   • Removing vault_1.5.5_openbsd_386.zip with score 2 lower than 42
   • Removing vault_1.5.5_netbsd_amd64.zip with score 22 lower than 42
   • Removing vault_1.5.5_netbsd_386.zip with score 2 lower than 42
   • Removing vault_1.5.5_linux_arm64.zip with score 32 lower than 42
   • Removing vault_1.5.5_linux_arm.zip with score 22 lower than 42
   • Keeping vault_1.5.5_linux_amd64.zip (URL https://releases.hashicorp.com/vault/1.5.5/vault_1.5.5_linux_amd64.zip) with highest score 42
   • Removing vault_1.5.5_linux_386.zip with score 22 lower than 42
   • Removing vault_1.5.5_freebsd_arm.zip with score 2 lower than 42
   • Removing vault_1.5.5_freebsd_amd64.zip with score 22 lower than 42
   • Removing vault_1.5.5_freebsd_386.zip with score 2 lower than 42
   • Removing vault_1.5.5_darwin_amd64.zip with score 22 lower than 42
   • Removing vault_1.5.5_darwin_386.zip with score 2 lower than 42
   • Checking binary from https://releases.hashicorp.com/vault/1.5.5/vault_1.5.5_linux_amd64.zip
   • Starting download of https://releases.hashicorp.com/vault/1.5.5/vault_1.5.5_linux_amd64.zip
48.85 MiB / 48.85 MiB [--------------------------------------------------------------------------------------------------------------------------------] 100.00% 39.25 MiB p/s 2s
   • Copying for vault@1.5.5 into /home/<redacted>/bin/vault
   • Done installing vault 1.5.5

Signed-off-by: Sune Keller <absukl@almbrand.dk>
@sirlatrom sirlatrom requested a review from marcosnils November 10, 2020 09:36
@marcosnils marcosnils merged commit 87f51ca into marcosnils:master Nov 11, 2020
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.

hashicorp provider doesn't work with vault
2 participants