Chromium Code Reviews| Index: utils/tests/pub/test_pub.dart |
| diff --git a/utils/tests/pub/test_pub.dart b/utils/tests/pub/test_pub.dart |
| index 87fe686af4dd4a150afa00c8f3309dbbb42ee93d..60eaa793ddc3ad9cdebf9baa4579a1d2a073226d 100644 |
| --- a/utils/tests/pub/test_pub.dart |
| +++ b/utils/tests/pub/test_pub.dart |
| @@ -1050,16 +1050,19 @@ class GitRepoDescriptor extends DirectoryDescriptor { |
| return super.create(parentDir).chain((rootDir) { |
| workingDir = rootDir; |
| - return writeTextFile(join(parentDir, '.gitconfig'), ''' |
| -[user] |
| - name = Test Pub |
| - email = pub@dartlang.org |
| -'''); |
| - }).chain(runGitStep); |
| + return runGitStep(null); |
| + }); |
| } |
| Future<String> _runGit(List<String> args, Directory workingDir) { |
| - return runGit(args, workingDir: workingDir.path).transform((result) { |
| + // Explicitly specify the committer information. Git needs this to commit |
| + // and we don't want to rely on the buildbots having this already set up. |
| + var environment = new Map.from(Platform.environment); |
|
nweiz
2012/10/26 18:34:06
Should the environment argument be automatically m
Bob Nystrom
2012/10/30 22:09:26
Done.
|
| + environment['GIT_COMMITTER_NAME'] = 'Pub Test'; |
| + environment['GIT_COMMITTER_EMAIL'] = 'pub@dartlang.org'; |
| + |
| + return runGit(args, workingDir: workingDir.path, |
| + environment: environment).transform((result) { |
| if (!result.success) { |
| throw "Error running: git ${Strings.join(args, ' ')}\n" |
| "${Strings.join(result.stderr, '\n')}"; |