mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 16:31:07 +00:00
Fix generate_package_config script for Windows paths
The change https://dart-review.googlesource.com/c/sdk/+/321722 does not handle a package path on Windows that uses backslashes. Add handling for this case. Bug: https://github.com/dart-lang/linter/issues/4411 Change-Id: I38fe39491ed60306dec1717b32f275c19ed0076b Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322342 Reviewed-by: Jonas Termansen <sortie@google.com>
This commit is contained in:
parent
86c86d638a
commit
6d8ef05196
|
@ -87,8 +87,8 @@ void main(List<String> args) {
|
|||
if (p.name == name) p
|
||||
];
|
||||
if (name == 'linter' && matches.length > 1) {
|
||||
final oldLinter = matches
|
||||
.firstWhere((p) => p.rootUri.endsWith('third_party/pkg/linter'));
|
||||
final oldLinter = matches.firstWhere((p) =>
|
||||
p.rootUri.replaceAll(r'\', '/').endsWith('third_party/pkg/linter'));
|
||||
packages.remove(oldLinter);
|
||||
matches.remove(oldLinter);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue