Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Unified Diff: sdk/lib/_internal/pub/bin/pub.dart

Issue 216603010: Rip out dart:io from pkg/http wherever possible. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: code review Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/oauth2/pubspec.yaml ('k') | sdk/lib/_internal/pub/lib/src/utils.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/bin/pub.dart
diff --git a/sdk/lib/_internal/pub/bin/pub.dart b/sdk/lib/_internal/pub/bin/pub.dart
index 8d06b80fb5feb1ba5f0f06d31da08e66241235ff..4d19e8edc12d474a1ddcc2da403ce1690c783d59 100644
--- a/sdk/lib/_internal/pub/bin/pub.dart
+++ b/sdk/lib/_internal/pub/bin/pub.dart
@@ -6,6 +6,7 @@ import 'dart:async';
import 'dart:io';
import 'package:args/args.dart';
+import 'package:http/http.dart' as http;
import 'package:path/path.dart' as path;
import 'package:stack_trace/stack_trace.dart';
@@ -136,7 +137,7 @@ and include the results in a bug report on http://dartbug.com/new.
/// Returns the appropriate exit code for [exception], falling back on 1 if no
/// appropriate exit code could be found.
int chooseExitCode(exception) {
- if (exception is HttpException || exception is HttpException ||
+ if (exception is HttpException || exception is http.ClientException ||
exception is SocketException || exception is PubHttpException) {
return exit_codes.UNAVAILABLE;
} else if (exception is FormatException || exception is DataException) {
« no previous file with comments | « pkg/oauth2/pubspec.yaml ('k') | sdk/lib/_internal/pub/lib/src/utils.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698