Skip to content

Commit

Permalink
fix: remove error when install version that has installted
Browse files Browse the repository at this point in the history
  • Loading branch information
dashixiong91 committed Oct 31, 2019
1 parent 7a25637 commit 6634049
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions libexec/fvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ function install(){
local temp_zip="${temp_dir}/flutter.zip"
local target_dir="${FVM_VERSIONS_DIR}/${version_short}"
if [[ -d ${target_dir} ]];then
print_red "Error: flutter $version_short seems to has installed ,please check it!!"
exit 1
print_green "flutter $version_short seems to has installed,skipted it!"
return
fi
rm -rf $temp_zip
mkdir -p `dirname $temp_zip`
Expand Down Expand Up @@ -219,8 +219,8 @@ function remove(){
function latest_dev(){
local latest_dev_dir="${FVM_VERSIONS_DIR}/latest-dev"
if [[ -d $latest_dev_dir ]];then
print_red "Error: version:latest-dev has created!! please don't recreate, you should upgrade it by execution \`flutter upgrade\`!"
exit 1
print_yellow "Warn: version:latest-dev has created!! please don't recreate, you should upgrade it by execution \`flutter upgrade\`!"
return
fi
local latest_dir="${FVM_VERSIONS_DIR}/latest"
if [[ ! -d $latest_dir ]];then
Expand Down

0 comments on commit 6634049

Please sign in to comment.