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

Unified Diff: utils/pub/pub.dart

Issue 11475046: Add Bob's path library to pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes Created 8 years 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 | « utils/pub/path.dart ('k') | utils/pub/validator/name.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/pub.dart
diff --git a/utils/pub/pub.dart b/utils/pub/pub.dart
index 1daf20d4613c2ffe833b161b393fdf620f8952c8..12f40532fe5235e4a1bfe60c0a40f96179109790 100644
--- a/utils/pub/pub.dart
+++ b/utils/pub/pub.dart
@@ -19,6 +19,7 @@ import 'command_version.dart';
import 'entrypoint.dart';
import 'exit_codes.dart' as exit_codes;
import 'package.dart';
+import 'path.dart' as path;
import 'pubspec.dart';
import 'source.dart';
import 'source_registry.dart';
@@ -216,7 +217,7 @@ abstract class PubCommand {
// TODO(rnystrom): Will eventually need better logic to walk up
// subdirectories until we hit one that looks package-like. For now, just
// assume the cwd is it.
- future = Entrypoint.load(currentWorkingDir, cache);
+ future = Entrypoint.load(path.current, cache);
}
future = future.chain((entrypoint) {
@@ -237,10 +238,10 @@ abstract class PubCommand {
future.handleException((e) {
if (e is PubspecNotFoundException && e.name == null) {
e = 'Could not find a file named "pubspec.yaml" in the directory '
- '$currentWorkingDir.';
+ '${path.current}.';
} else if (e is PubspecHasNoNameException && e.name == null) {
e = 'pubspec.yaml is missing the required "name" field (e.g. "name: '
- '${basename(currentWorkingDir)}").';
+ '${basename(path.current)}").';
}
handleError(e, future.stackTrace);
« no previous file with comments | « utils/pub/path.dart ('k') | utils/pub/validator/name.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698