in solutions_builder/copier_extensions/sb_helpers.py [0:0]
def get_current_user(project_id):
"""
Get current authenticated gcloud user.
"""
print(f" (Retrieving current authenticated gcloud user...)")
command = f"gcloud config list account --format 'value(core.account)' | head -n 1"
try:
email = exec_gcloud_output(command)
return email
except subprocess.CalledProcessError as e:
print_indent(f"{e.output}")
print_indent(f"Unable to retrieve current authenticated gcloud user.")
return ""