Index: sdk/lib/_internal/pub/lib/src/command.dart |
diff --git a/sdk/lib/_internal/pub/lib/src/command.dart b/sdk/lib/_internal/pub/lib/src/command.dart |
index 2375bfed28fdd3d50733cdef5293fed88130798e..9362df07eb114f46a6783e6b5ccdc8b704d9da7d 100644 |
--- a/sdk/lib/_internal/pub/lib/src/command.dart |
+++ b/sdk/lib/_internal/pub/lib/src/command.dart |
@@ -129,17 +129,9 @@ and include the results in a bug report on http://dartbug.com/new. |
if (commandFuture == null) return true; |
return commandFuture; |
- }).whenComplete(() => cache.deleteTempDir()).catchError((e) { |
- if (e is PubspecNotFoundException && e.name == null) { |
- e = new ApplicationException('Could not find a file named ' |
- '"pubspec.yaml" in the directory ${path.current}.'); |
- } else if (e is PubspecHasNoNameException && e.name == null) { |
- e = new ApplicationException('pubspec.yaml is missing the required ' |
- '"name" field (e.g. "name: ${path.basename(path.current)}").'); |
- } |
- |
- return handleError(e); |
- }).then((_) { |
+ }).whenComplete(() => cache.deleteTempDir()) |
+ .catchError(handleError) |
+ .then((_) { |
// Explicitly exit on success to ensure that any dangling dart:io handles |
// don't cause the process to never terminate. |
return flushThenExit(0); |