mirror of
https://github.com/flutter/packages.git
synced 2025-08-06 17:28:42 +08:00
[flutter_plugin_tools] Fix pubspec-check on Windows (#4428)
The repository check always failed when run on Windows, because the relative path generated to check the end of the URL was using local filesystem style for separators, but URLs always use POSIX separators.
This commit is contained in:
@ -177,7 +177,7 @@ class PubspecCheckCommand extends PackageLoopingCommand {
|
||||
errorMessages.add('Missing "repository"');
|
||||
} else {
|
||||
final String relativePackagePath =
|
||||
path.relative(package.path, from: packagesDir.parent.path);
|
||||
getRelativePosixPath(package.directory, from: packagesDir.parent);
|
||||
if (!pubspec.repository!.path.endsWith(relativePackagePath)) {
|
||||
errorMessages
|
||||
.add('The "repository" link should end with the package path.');
|
||||
|
Reference in New Issue
Block a user