From 36a4a806ea101624383d39a66b01ce6be584fcf6 Mon Sep 17 00:00:00 2001 From: Leo Farias Date: Tue, 8 Oct 2019 14:32:28 -0400 Subject: [PATCH] Bumped version for consistency with past Golang version, and improved error message. Closes #13 --- lib/commands/list.dart | 2 +- lib/utils/flutter_tools.dart | 3 +++ pubspec.yaml | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/commands/list.dart b/lib/commands/list.dart index 34a0ebf2..427bfa64 100644 --- a/lib/commands/list.dart +++ b/lib/commands/list.dart @@ -18,7 +18,7 @@ class ListCommand extends Command { Future run() async { final choices = await flutterListInstalledSdks(); if (choices.length == 0) { - logger.stdout('No SDKs have been installed.'); + logger.stdout('No SDKs have been installed yet.'); exit(0); } diff --git a/lib/utils/flutter_tools.dart b/lib/utils/flutter_tools.dart index 0e736646..96cfa89b 100644 --- a/lib/utils/flutter_tools.dart +++ b/lib/utils/flutter_tools.dart @@ -128,6 +128,9 @@ Future flutterSdkRemove(String version) async { /// Lists Installed Flutter SDK Version Future> flutterListInstalledSdks() async { + if (!await kVersionsDir.exists()) { + return []; + } final versions = kVersionsDir.listSync(); final installedVersions = versions diff --git a/pubspec.yaml b/pubspec.yaml index f159f33f..407eec98 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: fvm description: A simple version manager for Flutter. -version: 0.0.5 +version: 0.6.0 homepage: https://github.com/leoafarias/fvm author: Leo Farias