Repository navigation
Conversation
Agent: claude
cross-spawn normalizes the command for cmd.exe, which turns .\gradlew.bat back into the bare name gradlew.bat. Agent: claude
…d run-android Agent: claude
cortinico
approved these changes
Nov 24, 2026
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.
Summary
build-android,run-androidand the--interactivetask list now find the Gradle wrapper on Windows whenNoDefaultCurrentDirectoryInExePathis set.Fixes #2884.
They ran the bare name, which cmd then does not look up in the current folder. They now run
path.join(sourceDir, 'gradlew.bat');.\gradlew.batis not enough, as cross-spawn normalizes it back togradlew.bat.Test Plan
Three new tests stub
process.platformaswin32and check the command each place runs.Before/after vs base: 3 of 20 tests fail with base code; with
yarn install --frozen-lockfile --ignore-engines && yarn build:ts && yarn build && yarn jest packages/cli-platform-android && yarn lint, all 20 pass with this PR.Tests (agent-run) at d086057, clean setup (empty HOME, no git config):
yarn install --frozen-lockfile --ignore-engines && yarn build:ts && yarn build && yarn jest packages/cli-platform-android && yarn lint, exit 0. Last output line:Done in 11.22s..Real run (agent-run) on Windows Server 2022 under QEMU, with
NoDefaultCurrentDirectoryInExePath=1: the baregradlew.batfails with "'gradlew.bat' is not recognized"; the full path runs, in a folder with and without a space.AI disclosure: this PR was written with an AI coding agent; the test results above come from the agent's runs.