From 0daa67f510b6db4148ec33889ea4263efdaf23a5 Mon Sep 17 00:00:00 2001 From: thosakwe Date: Sat, 25 Mar 2017 18:33:28 -0400 Subject: [PATCH] 1.0.8 --- bin/angel.dart | 33 +++++++++++++++++++-------------- pubspec.yaml | 2 +- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/bin/angel.dart b/bin/angel.dart index 7ced0be..6a8ae5e 100644 --- a/bin/angel.dart +++ b/bin/angel.dart @@ -25,21 +25,26 @@ main(List args) async { ..addCommand(new RenameCommand()); stdout.write('Checking for update... '); - var client = new http.Client(); - var update = await checkForUpdate(client); - client.close(); - if (update != null) { - stdout.writeln(); - var pen = new TextPen(); - pen.cyan(); - pen.text( - 'ATTENTION: There is a new version of the Angel CLI available (version $update).'); - pen.text('\nTo update, run `pub global activate angel_cli`.'); - pen(); - stdout.writeln(); - } else - stdout.writeln('No update available.'); + try { + var client = new http.Client(); + var update = await checkForUpdate(client); + client.close(); + + if (update != null) { + stdout.writeln(); + var pen = new TextPen(); + pen.cyan(); + pen.text( + 'ATTENTION: There is a new version of the Angel CLI available (version $update).'); + pen.text('\nTo update, run `pub global activate angel_cli`.'); + pen(); + stdout.writeln(); + } else + stdout.writeln('No update available.'); + } catch (e) { + stdout.writeln('Failed to check for update.'); + } return await runner.run(args).then((_) {}).catchError((exc) { stderr.writeln("Oops, something went wrong: $exc"); diff --git a/pubspec.yaml b/pubspec.yaml index b4e736a..a642a60 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -2,7 +2,7 @@ author: "Tobe O " description: "Command-line tools for the Angel framework." homepage: "https://github.com/angel-dart/angel_cli" name: "angel_cli" -version: "1.0.7" +version: "1.0.8" dependencies: # analyzer: "^0.29.0" args: "^0.13.7"