Compare commits
3 Commits
19944e30d3
...
33c56714df
| Author | SHA1 | Date |
|---|---|---|
|
|
33c56714df | |
|
|
7ff836131a | |
|
|
2885c1cf35 |
|
|
@ -4716,7 +4716,9 @@ _p9k_gcloud_prefetch() {
|
|||
if ! _p9k_cache_stat_get $0 ${CLOUDSDK_CONFIG:-~/.config/gcloud}/configurations/config_$P9K_GCLOUD_CONFIGURATION; then
|
||||
local pair account project_id
|
||||
pair="$(gcloud config configurations describe $P9K_GCLOUD_CONFIGURATION \
|
||||
--format=$'value[separator="\1"](properties.core.account,properties.core.project)')"
|
||||
--quiet \
|
||||
--format=$'value[separator="\1"](properties.core.account,properties.core.project)' \
|
||||
</dev/null)"
|
||||
(( ! $? )) && IFS=$'\1' read account project_id <<<$pair
|
||||
_p9k_cache_stat_set "$account" "$project_id"
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -19,7 +19,9 @@ function _p9k_worker_main() {
|
|||
# usage: _p9k_worker_async <work> <callback>
|
||||
function _p9k_worker_async() {
|
||||
local fd async=$1
|
||||
sysopen -r -o cloexec -u fd <(() { eval $async; } && print -n '\x1e') || return
|
||||
(print -n '\x1e' &)
|
||||
pid=$!
|
||||
wait $pid || return 1
|
||||
(( ++_p9k_worker_inflight[$_p9k_worker_request_id] ))
|
||||
_p9k_worker_fds[$fd]=$_p9k_worker_request_id$'\x1f'$2
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue