File tree Expand file tree Collapse file tree
Framework/install_handler/android Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ async def check_status() -> bool:
2020 if adb_path .exists ():
2121 sdk_root = _get_sdk_root ()
2222 print (f"[installer][android-sdk] Already installed at { sdk_root } " )
23+
24+
2325 await send_response ({
2426 "action" : "status" ,
2527 "data" : {
@@ -88,12 +90,10 @@ def update_android_sdk_path():
8890
8991 current_path = os .environ .get ('PATH' , '' )
9092 for sdk_path in sdk_paths :
91- if sdk_path not in current_path :
92- os .environ ['PATH' ] = f"{ sdk_path } { os .pathsep } { current_path } "
93- current_path = os .environ ['PATH' ]
94- print (f"[installer][android-sdk] Added to current process PATH: { sdk_path } " )
95- else :
96- print (f"[installer][android-sdk] Already in PATH: { sdk_path } " )
93+ # Always prepend to ensure isolated SDK takes precedence (even if path already exists)
94+ os .environ ['PATH' ] = f"{ sdk_path } { os .pathsep } { current_path } "
95+ current_path = os .environ ['PATH' ]
96+ print (f"[installer][android-sdk] Prepended to current process PATH: { sdk_path } " )
9797
9898
9999def _get_cmdline_tools_url () -> str :
You can’t perform that action at this time.
0 commit comments