Skip to content

Commit 9bc6144

Browse files
committed
Only get project ID for authorized user if getting a token worked
1 parent 20f2ae7 commit 9bc6144

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gcloud_authorized_user.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ impl GCloudAuthorizedUser {
2020
/// Check if `gcloud` is installed and logged in
2121
pub async fn new() -> Result<Self, Error> {
2222
debug!("try to print access token via `gcloud`");
23-
let project_id = run(&["config", "get-value", "project"]).ok();
2423
let token = RwLock::new(Self::fetch_token()?);
24+
let project_id = run(&["config", "get-value", "project"]).ok();
2525
Ok(Self {
2626
project_id: project_id.map(Arc::from),
2727
token,

0 commit comments

Comments
 (0)