Spaces:
Paused
Paused
Commit
·
7dfa2b7
1
Parent(s):
952cf47
fixing project id env variable loading
Browse files- src/auth.py +1 -3
src/auth.py
CHANGED
|
@@ -137,7 +137,7 @@ def save_credentials(creds, project_id=None):
|
|
| 137 |
|
| 138 |
def get_credentials():
|
| 139 |
"""Loads credentials matching gemini-cli OAuth2 flow."""
|
| 140 |
-
global credentials, credentials_from_env
|
| 141 |
|
| 142 |
if credentials and credentials.token:
|
| 143 |
return credentials
|
|
@@ -195,7 +195,6 @@ def get_credentials():
|
|
| 195 |
|
| 196 |
# Extract project_id from environment credentials if available
|
| 197 |
if "project_id" in raw_env_creds_data:
|
| 198 |
-
global user_project_id
|
| 199 |
user_project_id = raw_env_creds_data["project_id"]
|
| 200 |
logging.info(f"Extracted project_id from environment credentials: {user_project_id}")
|
| 201 |
|
|
@@ -233,7 +232,6 @@ def get_credentials():
|
|
| 233 |
|
| 234 |
# Extract project_id from environment credentials if available
|
| 235 |
if "project_id" in raw_env_creds_data:
|
| 236 |
-
global user_project_id
|
| 237 |
user_project_id = raw_env_creds_data["project_id"]
|
| 238 |
logging.info(f"Extracted project_id from minimal environment credentials: {user_project_id}")
|
| 239 |
|
|
|
|
| 137 |
|
| 138 |
def get_credentials():
|
| 139 |
"""Loads credentials matching gemini-cli OAuth2 flow."""
|
| 140 |
+
global credentials, credentials_from_env, user_project_id
|
| 141 |
|
| 142 |
if credentials and credentials.token:
|
| 143 |
return credentials
|
|
|
|
| 195 |
|
| 196 |
# Extract project_id from environment credentials if available
|
| 197 |
if "project_id" in raw_env_creds_data:
|
|
|
|
| 198 |
user_project_id = raw_env_creds_data["project_id"]
|
| 199 |
logging.info(f"Extracted project_id from environment credentials: {user_project_id}")
|
| 200 |
|
|
|
|
| 232 |
|
| 233 |
# Extract project_id from environment credentials if available
|
| 234 |
if "project_id" in raw_env_creds_data:
|
|
|
|
| 235 |
user_project_id = raw_env_creds_data["project_id"]
|
| 236 |
logging.info(f"Extracted project_id from minimal environment credentials: {user_project_id}")
|
| 237 |
|