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
pull/1340/head
Éverton Arruda 4 years ago committed by GitHub
parent af86b53047
commit 4d15cf977e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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

Loading…
Cancel
Save