fix(cli): resolve Windows Appium and Android SDK binary paths - #1405
Merged
Simon Ingeson (smonn) merged 6 commits intoJul 30, 2026
Conversation
node_modules/.bin/appium is the extension-less POSIX script; CreateProcess cannot run it. Prefer the appium.cmd wrapper npm writes beside it, and pair it with the shell:true Node requires for a batch file after CVE-2024-27980. createAndroidEmulator has the same defect for a different reason: libuv appends .exe only during a PATH search, never to an explicit path, so $ANDROID_HOME/emulator/emulator and .../platform-tools/adb both miss. Fixes WIZ-11276
emulatorBin and adbBin are pure path builders, and three more call sites need them: emulatorSetup, the doctor SDK checks, and the AVD installer.
cmdline-tools ships sdkmanager and avdmanager as POSIX scripts plus .bat wrappers, and only the wrapper runs on Windows; defaultSpawn already adds the shell:true a batch file needs. The doctor SDK checks and emulatorSetup built adb and emulator paths of their own, so both missed the .exe suffix the previous commit added. The doctor checks take platform as a dep so the win32 branch is assertable on any host.
emulatorSetup and createAndroidEmulator each carried a copy of defaultAdb. The comment in emulatorSetup asked for this once a third call site appeared.
WalkthroughThe change adds platform-aware Android binary helpers, selecting Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
…umbin-returns-a-non-executable-path-on-windows # Conflicts: # src/shell/spawn.ts
Chase J (chajac)
approved these changes
Jul 30, 2026
Simon Ingeson (smonn)
deleted the
wiz-11276-resolveappiumbin-returns-a-non-executable-path-on-windows
branch
July 30, 2026 18:08
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes WIZ-11276
Overview of Changes
node_modules/.bin/appiumis the extension-less POSIX script, which Windows cannot execute, so Android flows and theappium/uiautomator2-driverdoctor checks failed there. The CLI now resolves theappium.cmdwrapper npm writes beside it, paired with theshell: trueNode requires for a batch file after CVE-2024-27980. The same treatment reachessdkmanager.batandavdmanager.batin cmdline-tools.Every Android binary now resolves through one pure module,
src/core/androidBins.ts, so the next one cannot drift. Two structural commits are split out: the move intocore/, and the extraction of thedefaultAdbexecutor thatemulatorSetupandcreateAndroidEmulatoreach carried a copy of.WIZ-11274 has since landed, and main is merged in. It touched the same security-contract comment in
src/shell/spawn.ts, so that roster now lists both sets of call sites. It also added aplatformfield to the doctor'sCheckDepsfor its npm check, which git collapsed into the one this branch added for the Android checks.Testing
Not verified on a real Windows host. Every win32 branch takes
platformas an argument, so the tests assert it on any host.bun run typecheck bun run lint bun run format:check bun run knip bun run test bun run buildChecklist