Skip to content

Commit

Permalink
Fix generate_package_config script for Windows paths
Browse files Browse the repository at this point in the history
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: dart-lang/linter#4411
Change-Id: I38fe39491ed60306dec1717b32f275c19ed0076b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322342
Reviewed-by: Jonas Termansen <[email protected]>
  • Loading branch information
whesse committed Aug 23, 2023
1 parent 86c86d6 commit 6d8ef05
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/generate_package_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 6d8ef05

Please sign in to comment.