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

Unified Diff: utils/pub/io.dart

Issue 11276042: Explicitly configure git committer. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 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 | utils/tests/pub/test_pub.dart » ('j') | utils/tests/pub/test_pub.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/io.dart
diff --git a/utils/pub/io.dart b/utils/pub/io.dart
index c2f14568906fd92033c75fdd9e71d1b2c4990d43..3eda416760fab8ff9adfd3a98ca562464b9aacec 100644
--- a/utils/pub/io.dart
+++ b/utils/pub/io.dart
@@ -499,7 +499,10 @@ Future<PubProcessResult> runProcess(String executable, List<String> args,
if (workingDir != null) {
options.workingDirectory = _getDirectory(workingDir).path;
}
- options.environment = environment;
+
+ if (environment != null) {
+ options.environment = environment;
+ }
var future = Process.run(executable, args, options);
return future.transform((result) {
@@ -556,8 +559,11 @@ Future<bool> get isGitInstalled {
}
/// Run a git process with [args] from [workingDir].
-Future<PubProcessResult> runGit(List<String> args, {String workingDir}) =>
- _gitCommand.chain((git) => runProcess(git, args, workingDir: workingDir));
+Future<PubProcessResult> runGit(List<String> args,
+ {String workingDir, Map<String, String> environment}) {
+ return _gitCommand.chain((git) => runProcess(git, 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.
« no previous file with comments | « no previous file | utils/tests/pub/test_pub.dart » ('j') | utils/tests/pub/test_pub.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698