Index: utils/pub/pub.dart |
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart |
index 1a8642e7bdb7e46b7bca758c0c636784d87576c3..157b6805154c42543d6c19ad7db9b2ece5c49250 100644 |
--- a/utils/pub/pub.dart |
+++ b/utils/pub/pub.dart |
@@ -261,8 +261,8 @@ abstract class PubCommand { |
future |
.then((_) => cache_.deleteTempDir()) |
- .catchError((error) { |
- var e = error.error; |
+ .catchError((asyncError) { |
+ var e = getRealError(asyncError); |
if (e is PubspecNotFoundException && e.name == null) { |
e = 'Could not find a file named "pubspec.yaml" in the directory ' |
'${path.current}.'; |
@@ -271,7 +271,7 @@ abstract class PubCommand { |
'${basename(path.current)}").'; |
} |
- handleError(e, error.stackTrace); |
+ handleError(e, getRealStackTrace(asyncError)); |
}) |
// Explicitly exit on success to ensure that any dangling dart:io handles |
// don't cause the process to never terminate. |