From 4d15cf977eb82ec127fd7ddfab281194765748e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89verton=20Arruda?= Date: Tue, 30 Mar 2021 19:46:50 +0200 Subject: [PATCH] Get active gcloud profile using `list` command (#1331) `gcloud config configure describe` command does not have `--filter` option. To filter the active profile using `--filter` it is necessary to use `gcloud config configure list` command --- internal/p10k.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/p10k.zsh b/internal/p10k.zsh index ea7b63c5..ed30454f 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -4498,7 +4498,7 @@ _p9k_gcloud_prefetch() { P9K_GCLOUD_CONFIGURATION=$_p9k__ret if ! _p9k_cache_stat_get $0 ~/.config/gcloud/configurations/config_$P9K_GCLOUD_CONFIGURATION; then local pair account project_id - pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \ + pair="$(gcloud config configurations list $P9K_GCLOUD_CONFIGURATION \ --format=$'value[separator="\1"](properties.core.account,properties.core.project)' \ --filter=is_active:true)" (( ! $? )) && IFS=$'\1' read account project_id <<<$pair