File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,21 @@ SETLOCAL ENABLEDELAYEDEXPANSION
15
15
16
16
FOR %%i IN (" %~dp0 .." ) DO SET FLUTTER_ROOT = %%~fi
17
17
18
+ REM If available, add location of bundled mingit to PATH
19
+ SET mingit_path = %FLUTTER_ROOT% \bin\mingit\cmd
20
+ IF EXIST " %mingit_path% " SET PATH = %PATH% ;%mingit_path%
21
+
22
+ REM Test if Git is available on the Host
23
+ where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
24
+ REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
25
+ IF NOT EXIST " %flutter_root% \.git" (
26
+ ECHO Error: The Flutter directory is not a clone of the GitHub project.
27
+ ECHO The flutter tool requires Git in order to operate properly;
28
+ ECHO to set up Flutter, run the following command:
29
+ ECHO git clone -b stable https://github.com/flutter/flutter.git
30
+ EXIT /B 1
31
+ )
32
+
18
33
REM Include shared scripts in shared.bat
19
34
SET shared_bin = %FLUTTER_ROOT% /bin/internal/shared.bat
20
35
CALL " %shared_bin% "
Original file line number Diff line number Diff line change @@ -26,21 +26,6 @@ SET pub_cache_path=%FLUTTER_ROOT%\.pub-cache
26
26
SET dart = %dart_sdk_path% \bin\dart.exe
27
27
SET pub = %dart_sdk_path% \bin\pub.bat
28
28
29
- REM If available, add location of bundled mingit to PATH
30
- SET mingit_path = %FLUTTER_ROOT% \bin\mingit\cmd
31
- IF EXIST " %mingit_path% " SET PATH = %PATH% ;%mingit_path%
32
-
33
- REM Test if Git is available on the Host
34
- where /q git || ECHO Error: Unable to find git in your PATH. && EXIT /B 1
35
- REM Test if the flutter directory is a git clone, otherwise git rev-parse HEAD would fail
36
- IF NOT EXIST " %flutter_root% \.git" (
37
- ECHO Error: The Flutter directory is not a clone of the GitHub project.
38
- ECHO The flutter tool requires Git in order to operate properly;
39
- ECHO to set up Flutter, run the following command:
40
- ECHO git clone -b stable https://github.com/flutter/flutter.git
41
- EXIT /B 1
42
- )
43
-
44
29
REM Detect which PowerShell executable is available on the Host
45
30
REM PowerShell version < = 5: PowerShell.exe
46
31
REM PowerShell version > = 6: pwsh.exe
You can’t perform that action at this time.
0 commit comments