femnad/fish-gcloud-completions

I don't understand how to use the utility

Closed this issue · 2 comments

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.

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.

Thank you!