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

Unified Diff: utils/pub/command_lish.dart

Issue 11830017: Fix ALL the pub tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 11 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
Index: utils/pub/command_lish.dart
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index a91e68277bac613bf318a6375589c18107738f71..71adb9723d63aaea20431b38f8bdc1b59ca6c08f 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -19,6 +19,7 @@ import 'io.dart';
import 'log.dart' as log;
import 'oauth2.dart' as oauth2;
import 'pub.dart';
+import 'utils.dart';
import 'validator.dart';
/// Handles the `lish` and `publish` pub commands.
@@ -69,9 +70,10 @@ class LishCommand extends PubCommand {
if (location == null) throw new PubHttpException(response);
return location;
}).then((location) => client.get(location))
- .then(handleJsonSuccess);
- }).catchError((e) {
- if (e is! PubHttpException) throw e;
+ .then(handleJsonSuccess);
+ }).catchError((asyncError) {
+ var e = getRealError(asyncError);
+ if (e is! PubHttpException) throw asyncError;
var url = e.response.request.url;
if (url.toString() == cloudStorageUrl.toString()) {
// TODO(nweiz): the response may have XML-formatted information about
@@ -146,7 +148,7 @@ class LishCommand extends PubCommand {
return false;
}
- return !splitPath(file).some(_BLACKLISTED_DIRECTORIES.contains);
+ return !splitPath(file).any(_BLACKLISTED_DIRECTORIES.contains);
}).toList());
}

Powered by Google App Engine
This is Rietveld 408576698