Skip to content

Commit 6634049

Browse files
committed
fix: remove error when install version that has installted
1 parent 7a25637 commit 6634049

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

libexec/fvm.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,8 @@ function install(){
180180
local temp_zip="${temp_dir}/flutter.zip"
181181
local target_dir="${FVM_VERSIONS_DIR}/${version_short}"
182182
if [[ -d ${target_dir} ]];then
183-
print_red "Error: flutter $version_short seems to has installed ,please check it!!"
184-
exit 1
183+
print_green "flutter $version_short seems to has installed,skipted it!"
184+
return
185185
fi
186186
rm -rf $temp_zip
187187
mkdir -p `dirname $temp_zip`
@@ -219,8 +219,8 @@ function remove(){
219219
function latest_dev(){
220220
local latest_dev_dir="${FVM_VERSIONS_DIR}/latest-dev"
221221
if [[ -d $latest_dev_dir ]];then
222-
print_red "Error: version:latest-dev has created!! please don't recreate, you should upgrade it by execution \`flutter upgrade\`!"
223-
exit 1
222+
print_yellow "Warn: version:latest-dev has created!! please don't recreate, you should upgrade it by execution \`flutter upgrade\`!"
223+
return
224224
fi
225225
local latest_dir="${FVM_VERSIONS_DIR}/latest"
226226
if [[ ! -d $latest_dir ]];then

0 commit comments

Comments
 (0)