harness / harness-cli

Harness CLI for managing Harness resources, from the command line using YAMLs as input [LIMITED GA]
MIT License
12 stars 13 forks source link

"harness update" doesn't work as expected #30

Closed Ompragash closed 1 year ago

Ompragash commented 1 year ago

Summary

harness Cli utility suggests the below if I am on the older version and on executing the harness update command, it's failing with unexpected EOF error.

[notice] A new release of harness cli is available: v0.0.7-alpha → v0.0.10-alpha
https://github.com/harness/harness-cli/releases/tag/v0.0.10-alpha
To update, run: harness update

Environment

Harness Cli Version: v0.0.7-alpha OS: Mac M1 Pro

Steps To Reproduce

Expected Results

harness cli updated to v0.0.10-alpha

Actual Results

# ./harness update
[notice] A new release of harness cli is available: v0.0.7-alpha → v0.0.10-alpha
https://github.com/harness/harness-cli/releases/tag/v0.0.10-alpha
To update, run: harness update
New version v0.0.10-alpha is available.
? Do you want to update? Yes
Downloading the following - https://github.com/harness/harness-cli/releases/download/v0.0.10-alpha/harness-cli-v0.0.10-alpha-darwin-amd64.tar.gz
Unpacking the contents and extracting to - /Users/ompragash
FATA[2023-07-24T17:01:57+05:30] unexpected EOF

Additionally, I also tried it with sudo but no luck:

# sudo ./harness update
Password:
[notice] A new release of harness cli is available: v0.0.7-alpha → v0.0.10-alpha
https://github.com/harness/harness-cli/releases/tag/v0.0.10-alpha
To update, run: harness update
New version v0.0.10-alpha is available.
? Do you want to update? Yes
Downloading the following - https://github.com/harness/harness-cli/releases/download/v0.0.10-alpha/harness-cli-v0.0.10-alpha-darwin-amd64.tar.gz
Unpacking the contents and extracting to - /Users/ompragash
FATA[2023-07-24T17:02:20+05:30] unexpected EOF
Ompragash commented 1 year ago

Looks like this issue still persists.

 # harness update
[notice] A new release of harness cli is available: v0.0.13-alpha → v0.0.14-alpha
https://github.com/harness/harness-cli/releases/tag/v0.0.14-alpha
To update, run: harness update
New version v0.0.14-alpha is available.
? Do you want to update? Yes
Downloading the following - https://github.com/harness/harness-cli/releases/download/v0.0.14-alpha/harness-cli-v0.0.14-alpha-darwin-amd64.tar.gz
Unpacking the contents and extracting to - /Users/ompragash
FATA[2023-08-30T17:31:20+05:30] unexpected EOF
terrafied commented 1 year ago

Still an issue. Looks to me like the harness update command creates an expected filename with harness-cli-v0.0.x rather than what I see in the releases area of this repo which is harness-v0.0.x. That's pretty sloppy since the -cli was removed from the release file name in version 0.0.3.