From d2907eb71f90bed65f67752ea99808fb72dcd78f Mon Sep 17 00:00:00 2001 From: leoafarias Date: Thu, 1 Apr 2021 15:53:39 -0400 Subject: [PATCH] Added trace on symlink --- lib/src/models/cache_version_model.dart | 6 ++++-- lib/src/utils/helpers.dart | 4 +++- lib/src/version.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/src/models/cache_version_model.dart b/lib/src/models/cache_version_model.dart index c0ecf6a8..77aec7e3 100644 --- a/lib/src/models/cache_version_model.dart +++ b/lib/src/models/cache_version_model.dart @@ -7,8 +7,6 @@ import '../utils/helpers.dart'; /// Cache Version model class CacheVersion { - String _sdkVersion; - /// Name of the version final String name; @@ -41,4 +39,8 @@ class CacheVersion { final otherVersion = assignVersionWeight(other.name); return version.compareTo(otherVersion); } + + String toString() { + return name; + } } diff --git a/lib/src/utils/helpers.dart b/lib/src/utils/helpers.dart index 887df948..c873b460 100644 --- a/lib/src/utils/helpers.dart +++ b/lib/src/utils/helpers.dart @@ -1,6 +1,7 @@ import 'dart:async'; import 'dart:io'; +import 'package:fvm/src/utils/logger.dart'; import 'package:path/path.dart'; import 'package:process_run/shell.dart'; import 'package:version/version.dart'; @@ -36,7 +37,8 @@ Future createLink(Link source, FileSystemEntity target) async { await source.delete(); } await source.create(target.path); - } on FileSystemException { + } on FileSystemException catch (e) { + logger.trace(e.message); if (Platform.isWindows) { throw const FvmInternalError( '''On Windows FVM requires to run in developer mode or as an administrator''', diff --git a/lib/src/version.dart b/lib/src/version.dart index a3330267..9aeea1b1 100644 --- a/lib/src/version.dart +++ b/lib/src/version.dart @@ -1,2 +1,2 @@ // Generated code. Do not modify. -const packageVersion = '2.0.0-dev.3'; +const packageVersion = '2.0.0-dev.4'; diff --git a/pubspec.yaml b/pubspec.yaml index d9ce4472..6cd191b8 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: fvm description: A simple cli to manage Flutter SDK versions per project. Support channels, releases, and local cache for fast switching between versions. -version: 2.0.0-dev.3 +version: 2.0.0-dev.4 homepage: https://github.com/leoafarias/fvm environment: