Skip to content

Commit 2ce360b

Browse files
committed
Fix $git typo in shared.bat that broke Windows cache invalidation
The git revision lookup in bin/internal/shared.bat used $git instead of git, which is invalid cmd.exe syntax. This caused the revision to always be empty, making the compile key degenerate to the constant ":" on Windows. As a result, git-revision-based invalidation of the flutter_tools snapshot never worked on Windows since version 3.29.0. Also quote %FLUTTER_ROOT% to handle paths with spaces, consistent with the pre-flutter#159424 code. Fixes flutter#187907
1 parent 764a079 commit 2ce360b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎bin/internal/shared.bat‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ GOTO :after_subroutine
7272
REM before getting the git revision.
7373
REM
7474
REM See https://github.com/flutter/flutter/issues/159018
75-
FOR /f %%r IN ('PUSHD %FLUTTER_ROOT% ^& $git rev-parse HEAD') DO (
75+
FOR /f %%r IN ('PUSHD "%FLUTTER_ROOT%" ^& git rev-parse HEAD') DO (
7676
SET revision=%%r
7777
)
7878
)

0 commit comments

Comments
 (0)