File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -20,12 +20,13 @@ def get_auth_principal(env_vars: EnvironmentVariables):
2020 except Exception :
2121 return None
2222
23- def get_build_info (env_vars : EnvironmentVariables ):
24- logger .info (f"Getting build info from { env_vars .BUILD_INFO_PATH } " )
25- if not env_vars .BUILD_INFO_PATH :
23+ def get_build_info ():
24+ build_info_path = os .environ .get ("BUILD_INFO_PATH" )
25+ logger .info (f"Getting build info from { build_info_path } " )
26+ if not build_info_path :
2627 return None
2728 try :
28- with open (env_vars . BUILD_INFO_PATH , "r" ) as f :
29+ with open (build_info_path , "r" ) as f :
2930 return json .load (f )
3031 except Exception :
3132 return None
@@ -50,7 +51,7 @@ async def register_agent(env_vars: EnvironmentVariables):
5051 "acp_url" : full_acp_url ,
5152 "acp_type" : env_vars .ACP_TYPE ,
5253 "principal_context" : get_auth_principal (env_vars ),
53- "registration_metadata" : get_build_info (env_vars )
54+ "registration_metadata" : get_build_info ()
5455 }
5556
5657 if env_vars .AGENT_ID :
You can’t perform that action at this time.
0 commit comments