@@ -199,22 +199,23 @@ class TestProject {
199
199
final pubspec = Pubspec .parse (
200
200
File (p.join (currentPath, 'pubspec.yaml' )).readAsStringSync (),
201
201
);
202
- for (final package in pubspec.dependencies.keys) {
203
- final dependency = pubspec.dependencies[package]! ;
202
+ for (final dependency in pubspec.dependencies.values) {
204
203
if (dependency is PathDependency ) {
205
- final dependencyDirectory = Directory (dependency.path);
204
+ final dependencyDirectory = Directory (
205
+ p.normalize (p.join (currentPath, dependency.path)),
206
+ );
206
207
// It may be okay to do some more complicated copying here for path
207
208
// dependencies that aren't immediately under `fixtures`, but for now,
208
209
// only support those that are.
209
210
assert (
210
- dependencyDirectory.parent == Directory (currentPath).parent,
211
+ dependencyDirectory.parent.path == Directory (currentPath).parent.path ,
211
212
'Path dependency of $packageDirectory : '
212
- '${dependencyDirectory .absolute . path } is not an immediate directory '
213
- 'in `fixtures`.' ,
213
+ '${dependencyDirectory .path } is not an immediate directory in '
214
+ '`fixtures`.' ,
214
215
);
215
216
_copyPackageAndPathDependenciesIntoTempDirectory (
216
217
tempDirectory,
217
- p.dirname (dependencyDirectory.path),
218
+ p.basename (dependencyDirectory.path),
218
219
copiedPackageDirectories,
219
220
);
220
221
}
0 commit comments