hashi-up icon indicating copy to clipboard operation
hashi-up copied to clipboard

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

Open tylert opened this issue 4 years ago • 1 comments

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).

tylert avatar Jul 23 '21 15:07 tylert

@jsiebens I am very much liking hashi-up for automating creating new build agents. Thanks again.

tylert avatar Jul 23 '21 15:07 tylert