Skip to content

Commit 07860bf

Browse files
committed
Use backward slashes on windows
1 parent 3929949 commit 07860bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/src/package.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ Consider changing the language version of ${p.join(dir, 'pubspec.yaml')} to ${La
210210
} else {
211211
packages.add(
212212
Package.load(
213-
p.join(dir, _toPosixIfNeeded(workspacePath)),
213+
p.join(dir, _useBackSlashesOnWindows(workspacePath)),
214214
loadPubspec: loadPubspec,
215215
withPubspecOverrides: withPubspecOverrides,
216216
),
@@ -583,9 +583,9 @@ See https://dart.dev/go/workspaces-stray-files for details.
583583
}
584584

585585
bool _looksLikeGlob(String s) => Glob.quote(s) != s;
586-
String _toPosixIfNeeded(String path) {
586+
String _useBackSlashesOnWindows(String path) {
587587
if (Platform.isWindows) {
588-
return p.posix.joinAll(p.split(path));
588+
return p.joinAll(p.split(path));
589589
}
590590
return path;
591591
}

0 commit comments

Comments
 (0)