@@ -17,25 +17,29 @@ echo "::group::Setting up FVM workspace"
17
17
if cd ${FVM_WORKSPACE} ; then
18
18
echo " Changed workspace directory to ${FVM_WORKSPACE} "
19
19
else
20
- echo " Failed to change workspace directory to ${FVM_WORKSPACE} "
20
+ echo " ::error:: Failed to change workspace directory to ${FVM_WORKSPACE} "
21
21
exit 1
22
22
fi
23
23
24
- if [ -f " .fvmrc" ]; then
25
- echo " Detected .fvmrc file, using it to install Flutter SDK"
26
- echo -e " yes\nyes\n" | fvm install
24
+ # Check if .fvmrc file exists
25
+ if [ ! -f " .fvmrc" ]; then
26
+ echo " ::error::No .fvmrc file found in the workspace. Please create one to specify the Flutter SDK version."
27
+ exit 1
28
+ fi
27
29
28
- # Invoke Flutter SDK to suppress the analytics.
29
- fvm flutter --version --suppress-analytics 2>&1 > /dev/null
30
+ echo " Detected .fvmrc file, using it to install Flutter SDK "
31
+ echo -e " yes\nyes\n " | fvm install
30
32
31
- # Disable Google Analytics and CLI animations
32
- fvm flutter config --no-analytics 2>&1 > /dev/null
33
- fvm flutter config --no-cli-animations 2>&1 > /dev/null
33
+ # Invoke Flutter SDK to suppress the analytics.
34
+ fvm flutter --version --suppress-analytics 2>&1 > /dev/null
34
35
35
- # Report success, and print version.
36
- echo " Succesfully installed Flutter SDK:"
37
- echo " ------------------------------------------------------------------------------"
38
- fvm dart --version
39
- fvm flutter --version
40
- fi
36
+ # Disable Google Analytics and CLI animations
37
+ fvm flutter config --no-analytics 2>&1 > /dev/null
38
+ fvm flutter config --no-cli-animations 2>&1 > /dev/null
39
+
40
+ # Report success, and print version.
41
+ echo " Succesfully installed Flutter SDK:"
42
+ echo " ------------------------------------------------------------------------------"
43
+ fvm dart --version
44
+ fvm flutter --version
41
45
echo " ::endgroup::"
0 commit comments