Closed xshyamx closed 8 months ago
Hi @xshyamx thanks for this suggestion, the app sounds fine to me.
For future suggestions, please can you follow the contribution guide and wait for approval before sending PRs? This is to avoid you spending unnecessary time and effort before we have agreement on a change.
The same approach applies to OpenFaaS/k3sup/inlets etc.
Alex
Sure. Will do that 👍🏽
Hi @alexellis ,
I'm encountering a special case with operator-sdk where there is no windows binary. There are a couple of options on how to handle it
Return empty URL for BinaryTemplate
or URLTemplate
both will fail with the following error messages
# empty BinaryTemplate
Downloading: https://github.com/operator-framework/operator-sdk/releases/download/v1.22.0/
Error: incorrect status for downloading tool: 404
# empty URLTemplate
Downloading:
Error: Get "": unsupported protocol scheme ""
Check for empty string from tool.GetURL
and throw an error
dlURL, err := tool.GetURL(os, arch, ver, quiet)
if err != nil {
return "", err
}
if dlURL == "" {
return "", errors.New("No available download for this environment")
}
Which results in
$ ./arkade get --os ming operator-sdk
Downloading: operator-sdk
2022/06/18 13:31:15 Looking up version for operator-sdk
2022/06/18 13:31:16 Found: v1.22.0
Error: No available download for this environment
I prefer option 2 but, would like your opinion on how to handle it
I'd say that you should allow then URL to be generated so that it's a valid URL but returns a 404. That's the approach we've taken elsewhere. Try it and see the message that you get.
Updated PR with suggested changes
Thank you. Can you check if you need to rebase? We are currently merging multiple PRs.
Yes. Have already rebased
/close
Add the
operator-sdk
CLI as a tool candidate for arkadeExpected Behaviour
Install operator-sdk
Current Behaviour
Not available as a candidate
Are you a GitHub Sponsor (Yes/No?)
Check at https://github.com/sponsors/alexellis
Possible Solution
Add operator-sdk as a tool candidate
Context
The operator-sdk CLI is not available as part of any of the default APT/Yum repositories and does not require any special privileges to run. So, it is a good candidate for an arkade tool.
Your Environment
Operating System and version (e.g. Linux, Windows, MacOS):
What arkade version is this? 0.8.5