Canonicalize path depdendencies in flutter update-packages
The tool was failing if we had 2 separate non-canonical paths to the same canonical paths.
This commit is contained in:
@@ -991,7 +991,9 @@ class PubspecDependency extends PubspecLine {
|
|||||||
assert(kind == DependencyKind.unknown);
|
assert(kind == DependencyKind.unknown);
|
||||||
if (line.startsWith(_pathPrefix)) {
|
if (line.startsWith(_pathPrefix)) {
|
||||||
// We're a path dependency; remember the (absolute) path.
|
// We're a path dependency; remember the (absolute) path.
|
||||||
_lockTarget = fs.path.absolute(fs.path.dirname(pubspecPath), line.substring(_pathPrefix.length, line.length));
|
_lockTarget = fs.path.canonicalize(
|
||||||
|
fs.path.absolute(fs.path.dirname(pubspecPath), line.substring(_pathPrefix.length, line.length))
|
||||||
|
);
|
||||||
_kind = DependencyKind.path;
|
_kind = DependencyKind.path;
|
||||||
} else if (line.startsWith(_sdkPrefix)) {
|
} else if (line.startsWith(_sdkPrefix)) {
|
||||||
// We're an SDK dependency.
|
// We're an SDK dependency.
|
||||||
|
|||||||
Reference in New Issue
Block a user