Skip to content

Commit f2a377e

Browse files
committed
More debugging
1 parent 0bb9d9e commit f2a377e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spartan/scripts/install_deps.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,17 @@ fi
6666
if 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

0 commit comments

Comments
 (0)