| Index: utils/pub/io.dart
|
| diff --git a/utils/pub/io.dart b/utils/pub/io.dart
|
| index 3bd88c404df8614f09b529c489b67bdf280df97d..e9c335c716a6bb9f0b1aafc96e3616505246b003 100644
|
| --- a/utils/pub/io.dart
|
| +++ b/utils/pub/io.dart
|
| @@ -365,6 +365,13 @@ String getFullPath(entry) {
|
| .toNativePath();
|
| }
|
|
|
| +/// Resolves [path] relative to the location of pub.dart.
|
| +String relativeToPub(String path) {
|
| + var scriptPath = new File(new Options().script).fullPathSync();
|
| + var scriptDir = new Path.fromNative(scriptPath).directoryPath;
|
| + return scriptDir.append(path).canonicalize().toNativePath();
|
| +}
|
| +
|
| // TODO(nweiz): make this configurable
|
| /**
|
| * The amount of time in milliseconds to allow HTTP requests before assuming
|
| @@ -646,14 +653,10 @@ Future<bool> _extractTarGzWindows(InputStream stream, String destination) {
|
| // read from stdin instead of a file. Consider resurrecting that version if
|
| // we can figure out why it fails.
|
|
|
| - // Find 7zip.
|
| - var scriptPath = new File(new Options().script).fullPathSync();
|
| - var scriptDir = new Path.fromNative(scriptPath).directoryPath;
|
| -
|
| // Note: This line of code gets munged by create_sdk.py to be the correct
|
| // relative path to 7zip in the SDK.
|
| var pathTo7zip = '../../third_party/7zip/7za.exe';
|
| - var command = scriptDir.append(pathTo7zip).canonicalize().toNativePath();
|
| + var command = relativeToPub(pathTo7zip);
|
|
|
| var tempDir;
|
|
|
|
|