leoafarias/fvm

[BUG] fvm use failed for custom version

lixi0912 opened this issue · 1 comments

Before creating a bug report please make check the following

  • You have read our FAQ
  • If you have used flutter. Please install correctly, run pub cache repair. Close the terminal and try again.
  • If you are on Windows. Make sure you are running the terminal as administrator or with developer permissions.
  • Run fvm doctor if possible and add the output to the issue.

Describe the bug
when i use a custom version, fvm will delete all versions and create a soft link file to self

To Reproduce
Steps to reproduce the behavior:

  1. Go to terminal..
  2. fvm global stable # wait for download flutter sdk
  3. flutter doctor # wait for download dart sdk
  4. fvm list
  5. cd ~/.fvm/versions
  6. git clone https://gitee.com/openharmony-sig/flutter_flutter.git custom_ohos
  7. fvm list
  8. cd ~
  9. fvm use custom_xxx
~ fvm list
[WARN] Version ohos is not a valid semver
Cache directory:  /Users/xxx/.fvm/versions
Directory Size: 2.54 GB
┌─────────────┬─────────┬─────────────────┬──────────────┬──────────────┬────────┬───────┐
│ Version     │ Channel │ Flutter Version │ Dart Version │ Release Date │ Global │ Local │
├─────────────┼─────────┼─────────────────┼──────────────┼──────────────┼────────┼───────┤
│ stable      │ stable  │ 3.22.2          │ 3.4.3        │ Jun 6, 2024  │ ●      │       │
├─────────────┼─────────┼─────────────────┼──────────────┼──────────────┼────────┼───────┤
│ custom_ohos │         │ Need setup      │              │              │        │ ●     │
└─────────────┴─────────┴─────────────────┴──────────────┴──────────────┴────────┴───────┘

➜  ~ fvm use custom_ohos
[WARN] Not checking for version mismatch as custom version is being used.
Setting up Flutter SDK: custom_ohos

[WARN] Version ohos is not a valid semver
Downloading Darwin arm64 Dart SDK from Flutter engine 1a65d409c7a1438a34d21b60bf30a6fd5db59314...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  217M  100  217M    0     0  9283k      0  0:00:24  0:00:24 --:--:-- 10.1M
Building flutter tool...
Flutter 3.7.12-ohos • channel dev • https://gitee.com/openharmony-sig/flutter_flutter.git
Framework • revision cff6c95108 (4 days ago) • 2024-06-29 07:43:22 +0000
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1

✓ Flutter SDK: SDK Version : custom_ohos is setup
Skipping "pub get" because no pubspec.yaml found.

✓ Project now uses Flutter SDK : SDK Version : custom_ohos

➜  ~ fvm list           
No SDKs have been installed yet. Flutter. SDKs
installed outside of fvm will not be displayed.
    
➜  versions ls -l
total 0
lrwxr-xr-x   1 xxx  staff   37  7  3 23:07 custom_ohos -> /Users/xxx/.fvm/versions/custom_ohos
 

Expected behavior
A clear and concise description of what you expected to happen.

Logs
Please provide the verbose logs by running --verbose after the command.

Desktop (please complete the following information):

  • OS: [Mac Os 14.5]
  • FVM Version [3.1.7]

Additional context
Add any other context about the problem here.

none

use default cache path, everything is ok.

:(
Cache directory: /Users/xxx/fvm/versions