This commit is contained in:
thosakwe 2017-03-25 18:33:28 -04:00
parent ac181b2242
commit 0daa67f510
2 changed files with 20 additions and 15 deletions

View file

@ -25,21 +25,26 @@ main(List<String> 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");

View file

@ -2,7 +2,7 @@ author: "Tobe O <thosakwe@gmail.com>"
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"