Chromium Code Reviews| Index: utils/compiler/create_snapshot.dart |
| diff --git a/utils/compiler/create_snapshot.dart b/utils/compiler/create_snapshot.dart |
| index 5e429bd29dd56e0b8d08feca8108ed0cc3074ff1..3077faa9cc7b04656def76b099bfe5bfb520cd0c 100644 |
| --- a/utils/compiler/create_snapshot.dart |
| +++ b/utils/compiler/create_snapshot.dart |
| @@ -3,11 +3,11 @@ |
| // BSD-style license that can be found in the LICENSE file. |
| import 'dart:io'; |
| +import "package:path/path.dart"; |
|
ahe
2013/08/14 16:14:09
I'm going to be very unreasonable and ask you to n
Søren Gjesse
2013/08/15 09:07:12
Removed, and changed this file to use the Uri clas
ahe
2013/08/15 09:29:00
Hopefully, that is temporary.
|
| Future<String> getVersion(var options, var rootPath) { |
| var suffix = Platform.operatingSystem == 'windows' ? '.exe' : ''; |
| - var printVersionScript = |
| - rootPath.append("tools").append("print_version.py").toNativePath(); |
| + var printVersionScript = join(rootPath, "tools", "print_version.py"); |
| return Process.run("python$suffix", [printVersionScript]).then((result) { |
| if (result.exitCode != 0) { |
| throw "Could not generate version"; |
| @@ -17,8 +17,8 @@ Future<String> getVersion(var options, var rootPath) { |
| } |
| Future<String> getSnapshotGenerationFile(var options, var args, var rootPath) { |
| - var dart2js = rootPath.append(args["dart2js_main"]); |
| - var dartdoc = rootPath.append(args["dartdoc_main"]); |
| + var dart2js = join(rootPath, args["dart2js_main"]); |
| + var dartdoc = join(rootPath, args["dartdoc_main"]); |
| return getVersion(options, rootPath).then((version) { |
| var snapshotGenerationText = |
| @@ -86,9 +86,9 @@ void main() { |
| if (!args.containsKey("output_dir")) throw "Please specify output_dir"; |
| if (!args.containsKey("package_root")) throw "Please specify package_root"; |
| - var scriptFile = new File(new File(options.script).fullPathSync()); |
| - var path = new Path(scriptFile.directory.path); |
| - var rootPath = path.directoryPath.directoryPath; |
| + var scriptFile = new File(options.script).fullPathSync(); |
| + var path = dirname(scriptFile); |
| + var rootPath = dirname(dirname(path)); |
| getSnapshotGenerationFile(options, args, rootPath).then((result) { |
| var wrapper = "${args['output_dir']}/utils_wrapper.dart"; |
| writeSnapshotFile(wrapper, result); |