jthegedus / asdf-gcloud

☁️ GCloud CLI (Google Cloud SDK) plugin for asdf version manager. Pin gcloud versions for each project!
https://asdf-vm.com
MIT License
55 stars 22 forks source link

bug: list-all script is failing with empty error output #90

Open sbocinec opened 8 months ago

sbocinec commented 8 months ago

Describe the bug

Listing gcloud versions with the current asdf version fails at the moment:

$ asdf list-all gcloud
`Plugin gcloud's list-all callback script failed with output:

$

This is caused as there are no linux- versions returned in some of the pages (as a result of the output pagination) as you can see after you run the list-all script with verbose output using bash -x .asdf/plugins/gcloud/bin/list-all: image

In this case, both grep commands used to fill the additions variable exits with 1 as there is no match.

Steps to reproduce

stano@sob ~ $ asdf plugin-add gcloud
updating plugin repository...HEAD is now at 8aa2e59 feat: add shorebird plugin (#949)
✅  All dependencies found on system!

stano@sob ~ $ asdf list gcloud
  No versions installed

stano@sob ~ $ asdf list-all gcloud
`Plugin gcloud's list-all callback script failed with output:

asdf version

v0.14.0-ccdd47d

asdf-gcloud version

current HEAD

gcloud version

this is not relevant here

Additional Information

No response

sbocinec commented 8 months ago

I have prepared a fix in #91