Skip to content

Commit c43fe2e

Browse files
committed
Revert "Reuse absolutePackageDirectory"
This reverts commit 7ffb363.
1 parent 7ffb363 commit c43fe2e

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dwds/test/fixtures/project.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -178,24 +178,24 @@ class TestProject {
178178
// package.
179179
final packageDirectory = p.basename(absolutePackageDirectory);
180180
if (copiedPackageDirectories.contains(packageDirectory)) return;
181+
final currentPath = absolutePath(pathFromFixtures: packageDirectory);
181182
final newPath = p.join(tempDirectory.absolute.path, packageDirectory);
182183
Directory(newPath).createSync();
183-
copyPathSync(absolutePackageDirectory, newPath);
184+
copyPathSync(currentPath, newPath);
184185
copiedPackageDirectories.add(packageDirectory);
185186
final pubspec = Pubspec.parse(
186-
File(p.join(absolutePackageDirectory, 'pubspec.yaml')).readAsStringSync(),
187+
File(p.join(currentPath, 'pubspec.yaml')).readAsStringSync(),
187188
);
188189
for (final dependency in pubspec.dependencies.values) {
189190
if (dependency is PathDependency) {
190191
final dependencyDirectory = Directory(
191-
p.normalize(p.join(absolutePackageDirectory, dependency.path)),
192+
p.normalize(p.join(currentPath, dependency.path)),
192193
);
193194
// It may be okay to do some more complicated copying here for path
194195
// dependencies that aren't immediately under `fixtures`, but for now,
195196
// only support those that are.
196197
assert(
197-
dependencyDirectory.parent.path ==
198-
Directory(absolutePackageDirectory).parent.path,
198+
dependencyDirectory.parent.path == Directory(currentPath).parent.path,
199199
'Path dependency of $packageDirectory: '
200200
'${dependencyDirectory.path} is not an immediate directory in '
201201
'`fixtures`.',

0 commit comments

Comments
 (0)