File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class LishCommand extends PubCommand {
103
103
// TODO(nweiz): the response may have XML-formatted information about
104
104
// the error. Try to parse that out once we have an easily-accessible
105
105
// XML parser.
106
- fail ('Failed to upload the package.' );
106
+ fail (log. red ( 'Failed to upload the package.' ) );
107
107
} else if (urisEqual (Uri .parse (url.origin), Uri .parse (server.origin))) {
108
108
handleJsonError (error.response);
109
109
} else {
Original file line number Diff line number Diff line change @@ -240,7 +240,7 @@ void handleJsonSuccess(http.Response response) {
240
240
parsed['success' ]['message' ] is ! String ) {
241
241
invalidServerResponse (response);
242
242
}
243
- log.message (parsed['success' ]['message' ]);
243
+ log.message (log. green ( parsed['success' ]['message' ]) );
244
244
}
245
245
246
246
/// Handles an unsuccessful JSON-formatted response from pub.dartlang.org.
@@ -255,7 +255,7 @@ void handleJsonError(http.Response response) {
255
255
errorMap['error' ]['message' ] is ! String ) {
256
256
invalidServerResponse (response);
257
257
}
258
- fail (errorMap['error' ]['message' ]);
258
+ fail (log. red ( errorMap['error' ]['message' ]) );
259
259
}
260
260
261
261
/// Parses a response body, assuming it's JSON-formatted.
@@ -275,7 +275,7 @@ Map parseJsonResponse(http.Response response) {
275
275
276
276
/// Throws an error describing an invalid response from the server.
277
277
void invalidServerResponse (http.Response response) =>
278
- fail ('Invalid server response:\n ${response .body }' );
278
+ fail (log. red ( 'Invalid server response:\n ${response .body }' ) );
279
279
280
280
/// Exception thrown when an HTTP operation fails.
281
281
class PubHttpException implements Exception {
You can’t perform that action at this time.
0 commit comments