@@ -86,10 +86,23 @@ class UpdateFlutterSdkCommand extends Command {
8686 }
8787
8888 // Next, update (or clone) the tool/flutter-sdk copy.
89+
90+ // On Windows LCUI trybots, some of the flutter repo paths cause
91+ // "Filename too long" errors. Filenames such as:
92+ // engine/src/flutter/testing/ios_scenario_app/ios/Scenarios/
93+ // ScenariosUITests/
94+ // golden_platform_view_clippath_with_transform_multiple_clips_impeller_iPhone SE (3rd generation)_26.2_simulator.png'.
95+ final gitLongFilesCommand = CliCommand .git ([
96+ 'config' ,
97+ 'core.longpaths' ,
98+ 'true' ,
99+ ]);
100+
89101 if (Directory (toolSdkPath).existsSync ()) {
90102 log.stdout ('Updating Flutter at $toolSdkPath ' );
91103 await processManager.runAll (
92104 commands: [
105+ gitLongFilesCommand,
93106 CliCommand .git (['fetch' ]),
94107 CliCommand .git (['checkout' , flutterVersion, '-f' ]),
95108 CliCommand .flutter (['--version' ]),
@@ -101,13 +114,15 @@ class UpdateFlutterSdkCommand extends Command {
101114 await processManager.runProcess (
102115 CliCommand .git ([
103116 'clone' ,
117+ '--no-checkout' ,
104118 'https://github.com/flutter/flutter' ,
105119 flutterSdkDirName,
106120 ]),
107121 workingDirectory: repo.toolDirectoryPath,
108122 );
109123 await processManager.runAll (
110124 commands: [
125+ gitLongFilesCommand,
111126 CliCommand .git (['checkout' , flutterVersion, '-f' ]),
112127 CliCommand .flutter (['--version' ]),
113128 ],
0 commit comments