Skip to content

Commit f141fa9

Browse files
committed
Use Directory.current when finding webdev path
1 parent 231cd81 commit f141fa9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test_common/lib/utilities.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ const newDdcTypeSystemVersion = '3.3.0-242.0.dev';
1515
/// The path to the webdev directory in the local machine, e.g.
1616
/// '/workstation/webdev'.
1717
String get webdevPath {
18-
final pathParts = p.split(p.current);
19-
// We expect all tests to be run from the webdev mono-repo:
18+
// Use `Directory.current` instead of `p.current` as the latter is allowed to
19+
// change with `DartUri.currentDirectory` modifications.
20+
final pathParts = p.split(Directory.current.path);
2021
assert(pathParts.contains(webdevDirName));
2122
return p.joinAll(
2223
pathParts.sublist(0, pathParts.lastIndexOf(webdevDirName) + 1),

0 commit comments

Comments
 (0)