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

Download url incorrect on mac #48

Open
david-martin opened this issue Jun 9, 2023 · 4 comments
Open

Download url incorrect on mac #48

david-martin opened this issue Jun 9, 2023 · 4 comments
Assignees
Labels
bug Something isn't working priority:medium

Comments

@david-martin
Copy link

Sometimes on mac, the curl response from github is a single line rather than formatted json.
This happens more often than not and I can't determine the cause.
It looks like the same kind of problem as the kustomize install script here.

If I try the cmd it's attempting to run, you can see the wrong url being parsed out:

curl -fsSL https://api.github.com/repos/submariner-io/releases/releases/latest | grep 'browser_download_url.*-darwin-amd64' | head -n 1 | cut -d\" -f 4
https://api.github.com/repos/submariner-io/releases/releases/107454110

However, if you pipe the output from curl to jq, the url is correct.

curl -fsSL https://api.github.com/repos/submariner-io/releases/releases/latest | jq | grep 'browser_download_url.*-darwin-amd64' | head -n 1 | cut -d\" -f 4
https://github.com/submariner-io/releases/releases/download/v0.15.1/subctl-v0.15.1-darwin-amd64.tar.xz
@maayanf24 maayanf24 added the bug Something isn't working label Jun 13, 2023
@maayanf24
Copy link

@david-martin - We don't think the issue here is in Submariner.

@david-martin
Copy link
Author

@david-martin - We don't think the issue here is in Submariner.

Agreed.
However it could be fixed with a change to the download script?
Specifically here? https://github.com/submariner-io/get.submariner.io/blob/devel/index.html#L116

If that's not something you want to fix though, I understand.

@dfarrell07 dfarrell07 self-assigned this Jun 20, 2023
@skitt skitt assigned tpantelis and aswinsuryan and unassigned dfarrell07 Oct 17, 2023
@tpantelis
Copy link

However, if you pipe the output from curl to jq, the url is correct.

This assumes jq is installed. It isn't on my MAC.

@david-martin
Copy link
Author

@tpantelis I'm not suggesting that as the fix.
Using 'jq' demonstrates how the script makes an assumption about the response from github i.e. that it is always formatted a specific way.

@maayanf24 maayanf24 added this to Backlog Jul 2, 2024
@maayanf24 maayanf24 moved this to Backlog in Backlog Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority:medium
Projects
Status: Backlog
Development

No branches or pull requests

5 participants