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

I don't understand how to use the utility #1

Closed
bdmorin opened this issue Dec 12, 2022 · 2 comments
Closed

I don't understand how to use the utility #1

bdmorin opened this issue Dec 12, 2022 · 2 comments

Comments

@bdmorin
Copy link

bdmorin commented Dec 12, 2022

I've been trying to get the fgc.py utlitiy to go, but i keep getting exceptions regarding downloads and version. I don't understand why it's doing it.

❯ ./fgc.py
Traceback (most recent call last):
  File "/Users/bdmorin/src/github.com/femnad/fish-gcloud-completions/fgc.py", line 179, in <module>
    main()
  File "/Users/bdmorin/src/github.com/femnad/fish-gcloud-completions/fgc.py", line 175, in main
    process_completion_file(args.sdk, args.output, args.subset)
  File "/Users/bdmorin/src/github.com/femnad/fish-gcloud-completions/fgc.py", line 160, in process_completion_file
    tar_file = download()
  File "/Users/bdmorin/src/github.com/femnad/fish-gcloud-completions/fgc.py", line 120, in download
    sdk_link = get_sdk_link()
  File "/Users/bdmorin/src/github.com/femnad/fish-gcloud-completions/fgc.py", line 113, in get_sdk_link
    version = get_latest_version()
  File "/Users/bdmorin/src/github.com/femnad/fish-gcloud-completions/fgc.py", line 104, in get_latest_version
    raise Exception('Cannot determine latest version')
Exception: Cannot determine latest version

I saw the requirement for google-cloud-sdk/data/cli/gcloud_completions.py and symlinked it to the same location as the fgc.py script, but that didn't work.

I'd like to be able to regenerate the gcloud.fish file.

Any help is appreciated.

femnad added a commit that referenced this issue Dec 12, 2022
* We're not following redirects so update to the current installation URL.
* Update version line regex

Addresses #1.
@femnad
Copy link
Owner

femnad commented Dec 12, 2022

So the URL for downloading the latest archive has changed which is a problem as the script is not following redirects. Also on that page, the text which precedes the current version was changed as well, which is used to determine the latest version for downloading the archive.

If you already have an archive you can skip the version parsing and download bits by specifying the archive with the -f flag, the readme explains that a bit now.

@femnad femnad closed this as completed Dec 12, 2022
@bdmorin
Copy link
Author

bdmorin commented Dec 15, 2022

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants