File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change 6666if command -v gcloud & > /dev/null; then
6767 echo " We have gcloud"
6868 # Check if GKE auth plugin is already installed
69- if command -v gke-gcloud-auth-plugin & > /dev/null ||
70- gcloud components list --filter=" id:gke-gcloud-auth-plugin" --format=" value(state.name)" 2> /dev/null | grep -q " Installed" ; then
71- echo " Already have it"
69+ if command -v gke-gcloud-auth-plugin & > /dev/null; then
70+ echo " Already have it - found in PATH at: $( which gke-gcloud-auth-plugin) "
71+ elif gcloud components list --filter=" id:gke-gcloud-auth-plugin" --format=" value(state.name)" 2> /dev/null | grep -q " Installed" ; then
72+ echo " Already have it - gcloud components says it's installed"
73+ echo " But not in PATH. Let's check where it might be:"
74+ find /usr -name " gke-gcloud-auth-plugin" 2> /dev/null || true
75+ find /opt -name " gke-gcloud-auth-plugin" 2> /dev/null || true
76+ # Force reinstall via apt since it's not actually available
77+ echo " Force installing via apt..."
78+ sudo apt-get update
79+ sudo apt-get install -y google-cloud-cli-gke-gcloud-auth-plugin
7280 elif dpkg -l google-cloud-cli 2> /dev/null | grep -q " ^ii" ; then
7381 # Check if apt package is already installed
7482 if dpkg -l google-cloud-cli-gke-gcloud-auth-plugin 2> /dev/null | grep -q " ^ii" ; then
You can’t perform that action at this time.
0 commit comments