chore(deps): update Gradle to v9.5.1#5419
Conversation
9e0b02d to
5a3e92d
Compare
| echo location of your Java installation. 1>&2 | ||
|
|
||
| goto fail | ||
| "%COMSPEC%" /c exit 1 |
There was a problem hiding this comment.
Bug: In gradlew.bat, using "%COMSPEC%" /c exit 1 fails to terminate the script on Windows when Java is not found, leading to spurious follow-on errors.
Severity: MEDIUM
Suggested Fix
Revert the change from "%COMSPEC%" /c exit 1 back to goto fail. The goto fail command correctly jumps to the :fail label, which then uses exit /b 1 to terminate the batch script with an error code, providing the intended fail-fast behavior.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: gradlew.bat#L54
Potential issue: In `gradlew.bat`, replacing `goto fail` with `"%COMSPEC%" /c exit 1`
fails to terminate the script on Windows when Java is not found. The new command spawns
a child process that exits, but the parent script continues execution. This results in
the script printing an initial error, then incorrectly falling through to other labels,
producing a second spurious error message before attempting to run a non-existent Java
binary. The previous `goto fail` logic correctly terminated the script in these error
conditions.
Did we get this right? 👍 / 👎 to inform future reviews.
|
@dependabot rebase |
5a3e92d to
61cde8a
Compare
| echo location of your Java installation. 1>&2 | ||
|
|
||
| goto fail | ||
| "%COMSPEC%" /c exit 1 |
There was a problem hiding this comment.
Bug: The gradlew.bat script fails to exit properly after a JAVA_HOME error, leading to a confusing secondary error message.
Severity: MEDIUM
Suggested Fix
Replace "%COMSPEC%" /c exit 1 with exit /b 1 to ensure the batch script terminates immediately after reporting the JAVA_HOME error, preventing fall-through to the :execute label.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: gradlew.bat#L68
Potential issue: In `gradlew.bat`, when `JAVA_HOME` is invalid or not set, the script
attempts to exit using `"%COMSPEC%" /c exit 1`. This command only terminates a child
command prompt, not the parent batch script itself. Consequently, execution falls
through to the `:execute` label. This causes a subsequent attempt to run Gradle with an
invalid `%JAVA_EXE%` path, leading to a confusing secondary error message instead of a
clean exit after the initial error report.
📲 Install BuildsAndroid
|
Bumps scripts/update-gradle.sh from v9.5.0 to v9.5.1.
Auto-generated by a dependency updater.
Changelog
Commits between v9.5.0 and v9.5.1
releasebranch (#37848)BaseDirFileResolverwhen Tooling API receives a relative project directory