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 9fe67f0e00c7c46015046011d3081f8f37d96f8f..bb264b1d1c8af0b168259d01e471f4e5b99b2e33 100644 |
| --- a/utils/tests/pub/test_pub.dart |
| +++ b/utils/tests/pub/test_pub.dart |
| @@ -975,10 +975,27 @@ class TarFileDescriptor extends Descriptor { |
| tempDir = _tempDir; |
| return Futures.wait(contents.map((child) => child.create(tempDir))); |
| }).chain((_) { |
| - var args = ["--directory", tempDir.path, "--create", "--gzip", "--file", |
| - join(parentDir, _stringName)]; |
| - args.addAll(contents.map((child) => child.name)); |
| - return runProcess("tar", args); |
| + if (Platform.operatingSystem != "windows") { |
| + var args = ["--directory", tempDir.path, "--create", "--gzip", |
| + "--file", join(parentDir, _stringName)]; |
| + args.addAll(contents.map((child) => child.name)); |
| + return runProcess("tar", args); |
| + } else { |
| + // TODO(bob): HACK TEMP!!!!! |
| + var command = "C:\\Program Files (x86)\\7-Zip\\7z.exe"; |
|
nweiz
2012/09/18 23:07:12
Make this a real path
Bob Nystrom
2012/09/19 15:57:54
Oopsie! Done.
|
| + |
| + // Create the tar file. |
| + var tarFile = join(tempDir, _stringName.replaceAll("tar.gz", "tar")); |
| + var args = ["a", tarFile]; |
| + args.addAll(contents.map( |
| + (child) => '-i!"${join(tempDir, child.name)}"')); |
| + |
| + return runProcess(command, args).chain((_) { |
| + // GZIP it. 7zip doesn't support doing both as a single operation. |
| + args = ["a", join(parentDir, _stringName), tarFile]; |
| + return runProcess(command, args); |
| + }); |
| + } |
| }).chain((result) { |
| if (!result.success) { |
| throw "Failed to create tar file $name.\n" |