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

Unified Diff: lib/src/git.dart

Issue 1148443005: Use an auto-generated pub snapshot for tests. (Closed) Base URL: git@github.com:dart-lang/pub_test@master
Patch Set: Code review changes Created 5 years, 7 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/io.dart » ('j') | no next file with comments »
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 53d69d89f3d6012776888d85db5beea3a0148a17..f2c2c226416453c4ea502e343738c683a7661d71 100644
--- a/lib/src/git.dart
+++ b/lib/src/git.dart
@@ -76,6 +76,18 @@ List<String> runSync(List<String> args, {String workingDir,
return result.stdout;
}
+/// Starts a git process and returns it.
+Future<PubProcess> start(List<String> args,
+ {String workingDir, Map<String, String> environment}) {
+ if (!isInstalled) {
+ fail("Cannot find a Git executable.\n"
+ "Please ensure Git is correctly installed.");
+ }
+
+ return startProcess(_gitCommand, 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 {
« no previous file with comments | « no previous file | lib/src/io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698