Skip to content

Get feature should check if the file already exists before attempting to download overtop #24

@tylert

Description

@tylert

At the moment, if you run hashi-up foo get it will download the file regardless of whether the binary already exists...

$ sudo hashi-up terraform get --dest /usr/local/bin
Password:
Downloading file https://releases.hashicorp.com/terraform/1.0.3/terraform_1.0.3_darwin_amd64.zip
31.22 MiB / 31.22 MiB [-----------------------------------------------------------------------------------------------------] 100.00%
Extracting file: terraform to /usr/local/bin
$ sudo hashi-up terraform get --dest /usr/local/bin
Downloading file https://releases.hashicorp.com/terraform/1.0.3/terraform_1.0.3_darwin_amd64.zip
31.22 MiB / 31.22 MiB [-----------------------------------------------------------------------------------------------------] 100.00%
Extracting file: terraform to /usr/local/bin
$ sudo hashi-up terraform get --dest /usr/local/bin
Downloading file https://releases.hashicorp.com/terraform/1.0.3/terraform_1.0.3_darwin_amd64.zip
31.22 MiB / 31.22 MiB [-----------------------------------------------------------------------------------------------------] 100.00%
Extracting file: terraform to /usr/local/bin
...

It would be fantastic if hashi-up would display the output of foo version if it finds the binary exists already and perhaps skips downloading if version is already latest (or else it would just halt right away without checking versions on releases.hashicorp.com).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions