| 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.
|
|
|