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

Unified Diff: lib/src/git.dart

Issue 1317043002: React gracefully to a fully-.gitignored package. (Closed) Base URL: git@github.com:dart-lang/pub.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « no previous file | lib/src/package.dart » ('j') | lib/src/package.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/git.dart
diff --git a/lib/src/git.dart b/lib/src/git.dart
index 087a995c70440671e2325ccc0b5ebb48e0ce96ac..14ab538e6761641d8a13145dbfb5f9b8905f65ec 100644
--- a/lib/src/git.dart
+++ b/lib/src/git.dart
@@ -34,7 +34,7 @@ class GitException implements ApplicationException {
/// Tests whether or not the git command-line app is available for use.
bool get isInstalled {
if (_isInstalledCache != null) return _isInstalledCache;
- _isInstalledCache = _gitCommand != null;
+ _isInstalledCache = command != null;
return _isInstalledCache;
}
bool _isInstalledCache;
@@ -51,7 +51,7 @@ Future<List<String>> run(List<String> args,
}
log.muteProgress();
- return runProcess(_gitCommand, args, workingDir: workingDir,
+ return runProcess(command, args, workingDir: workingDir,
environment: environment).then((result) {
if (!result.success) throw new GitException(args, result.stderr.join("\n"));
@@ -69,7 +69,7 @@ List<String> runSync(List<String> args, {String workingDir,
"Please ensure Git is correctly installed.");
}
- var result = runProcessSync(_gitCommand, args,
+ var result = runProcessSync(command, args,
workingDir: workingDir,
environment: environment);
if (!result.success) throw new GitException(args, result.stderr.join("\n"));
@@ -84,13 +84,13 @@ Future<PubProcess> start(List<String> args,
"Please ensure Git is correctly installed.");
}
- return startProcess(_gitCommand, args, workingDir: workingDir,
+ return startProcess(command, args, workingDir: workingDir,
environment: environment);
}
/// Returns the name of the git command-line app, or null if Git could not be
/// found on the user's PATH.
-String get _gitCommand {
+String get command {
if (_commandCache != null) return _commandCache;
var command;
« no previous file with comments | « no previous file | lib/src/package.dart » ('j') | lib/src/package.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698