gcloud docs location was not in same direction as "which gcloud" supplied
blastdan opened this issue · 4 comments
When running the cache build everything failed because the docs folder wasn't found.
I needed to update the bin_path to.
gcloud_bin_path="/usr/lib64/google-cloud-sdk"
the bin path in __gcloud_sel was fine as is, however.
Thanks for reporting this 🙏
When running the cache build everything failed because the docs folder wasn't found.
Could you please let me know the output of:
which gcloud
on your system?
There should be a folder with documentation in the cloud root + /lib/surface
.
For instance, on my homebrew install:
$ which gcloud
/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/bin/gcloud
Could you also please run the following & let me know the result on your machine?
$ gcloud info 2>/dev/null |grep -i 'Installation Root'
Installation Root: [/usr/local/Caskroom/google-cloud-sdk/latest/google-cloud-sdk]
If your gcloud
binary is located in a different directory (or you have a symlink of some sort in your path, this could cause this failure). It would probably be safer to change the script to use the gcloud info
command output, rather than the result of which
, which can be subject to many problems
The computer I used to set all this up is put away at the moment. I can try and get back to it after I move in a month or so.
It would have been the latest sdk at the time as I was setting up the environment from scratch. I forget the pathing that I used to fix it. I modified the script to now use which gcloud, but the location where the docs were.
So I replaced it with
gcloud_bin_path="$(gcloud info 2>/dev/null |grep -i 'Installation Root' | awk -F '[][]' '{print $2}')"
seems like there is a better way to parse this, but it did end up working for my database creation.