Commit 09fec4c5 authored by Amir Hardon's avatar Amir Hardon Committed by amirh

Canonicalize path depdendencies in `flutter update-packages`

The tool was failing if we had 2 separate non-canonical paths to the
same canonical paths.
parent 592731f2
......@@ -991,7 +991,9 @@ class PubspecDependency extends PubspecLine {
assert(kind == DependencyKind.unknown);
if (line.startsWith(_pathPrefix)) {
// 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;
} else if (line.startsWith(_sdkPrefix)) {
// We're an SDK dependency.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment