From 70caca26419d79d5c6df274ba80769d8f3afbe6b Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 23 Oct 2017 14:21:18 -0700 Subject: [PATCH] Emit exit code 69 for TlsExceptions Closes #1729 --- lib/src/command_runner.dart | 1 + lib/src/source/hosted.dart | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/src/command_runner.dart b/lib/src/command_runner.dart index c767d8c9f..9e1f1b91b 100644 --- a/lib/src/command_runner.dart +++ b/lib/src/command_runner.dart @@ -235,6 +235,7 @@ and include the logs in an issue on https://github.com/dart-lang/pub/issues/new if (exception is HttpException || exception is http.ClientException || exception is SocketException || + exception is TlsException || exception is PubHttpException || exception is DependencyNotFoundException) { return exit_codes.UNAVAILABLE; diff --git a/lib/src/source/hosted.dart b/lib/src/source/hosted.dart index f68f39bd9..c8f5c7a65 100644 --- a/lib/src/source/hosted.dart +++ b/lib/src/source/hosted.dart @@ -329,7 +329,7 @@ class BoundHostedSource extends CachedSource { stackTrace); } - if (error is io.SocketException) { + if (error is io.SocketException || error is io.TlsException) { fail("Got socket error trying to find package $package at $url.", error, stackTrace); }