Skip to content

Commit 36ee154

Browse files
Always prepend the path
1 parent bd0f75a commit 36ee154

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

Framework/install_handler/android/android_sdk.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff 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

9999
def _get_cmdline_tools_url() -> str:

0 commit comments

Comments
 (0)