| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS d.file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE d.file. | 3 // BSD-style license that can be found in the LICENSE d.file. |
| 4 | 4 |
| 5 import 'package:path/path.dart' as path; | 5 import 'package:path/path.dart' as path; |
| 6 import 'package:pub/src/io.dart'; | 6 import 'package:pub/src/io.dart'; |
| 7 | 7 |
| 8 import '../descriptor.dart' as d; | 8 import '../descriptor.dart' as d; |
| 9 import '../test_pub.dart'; | 9 import '../test_pub.dart'; |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 pubGet(); | 27 pubGet(); |
| 28 | 28 |
| 29 // Note: Using canonicalize here because pub gets the path to the | 29 // Note: Using canonicalize here because pub gets the path to the |
| 30 // entrypoint package from the working directory, which has had symlinks | 30 // entrypoint package from the working directory, which has had symlinks |
| 31 // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we | 31 // resolve. On Mac, "/tmp" is actually a symlink to "/private/tmp", so we |
| 32 // need to accomodate that. | 32 // need to accomodate that. |
| 33 schedulePub(args: ["list-package-dirs", "--format=json"], | 33 schedulePub(args: ["list-package-dirs", "--format=json"], |
| 34 outputJson: { | 34 outputJson: { |
| 35 "packages": { | 35 "packages": { |
| 36 "foo": path.join(sandboxDir, "foo", "lib"), | 36 "foo": path.join(sandboxDir, "foo", "lib"), |
| 37 "bar": port.then((p) => path.join(sandboxDir, cachePath, "hosted", | 37 "bar": globalServer.port.then( |
| 38 "localhost%58$p", "bar-1.0.0", "lib")), | 38 (p) => path.join(sandboxDir, cachePath, "hosted", |
| 39 "localhost%58$p", "bar-1.0.0", "lib")), |
| 39 "myapp": canonicalize(path.join(sandboxDir, appPath, "lib")) | 40 "myapp": canonicalize(path.join(sandboxDir, appPath, "lib")) |
| 40 }, | 41 }, |
| 41 "input_files": [ | 42 "input_files": [ |
| 42 canonicalize(path.join(sandboxDir, appPath, "pubspec.lock")), | 43 canonicalize(path.join(sandboxDir, appPath, "pubspec.lock")), |
| 43 canonicalize(path.join(sandboxDir, appPath, "pubspec.yaml")) | 44 canonicalize(path.join(sandboxDir, appPath, "pubspec.yaml")) |
| 44 ] | 45 ] |
| 45 }); | 46 }); |
| 46 }); | 47 }); |
| 47 } | 48 } |
| OLD | NEW |