SIGN IN SIGN UP

[flutter_tools] Fix $git typo in shared.bat to restore cache invalidation on Windows (#191217)

## Description
In `bin/internal/shared.bat`, a typo (`$git` instead of `git`) prevented
the batch script from obtaining the current Git revision on Windows.
Because errors were redirected to `2>NUL`, this failure occurred
silently, and the compile stamp file (`bin\cache\flutter_tools.stamp`)
was always written as `:`. This broke the caching mechanism that ensures
`flutter_tools` is recompiled when checking out a different Flutter SDK
revision.

This PR fixes the typo, wraps `%FLUTTER_ROOT%` in double quotes in the
`PUSHD` command to handle directory paths with spaces, and chains with
`&&` so `git rev-parse HEAD` is only executed if `PUSHD` succeeds.

## Related Issues
Fixes https://github.com/flutter/flutter/issues/187907

## Tests
- None: trivial syntax fix to Windows launcher batch script
(`shared.bat`).
B
Ben Konyi committed
4e38982221efc8cfd59eabc36c6cd9e400d337dc
Parent: 0cb3b7e
Committed by GitHub <noreply@github.com> on 8/24/2026, 11:09:45 PM