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:
Amir Hardon 2018-08-20 09:45:18 -07:00 committed by amirh
parent 592731f220
commit 09fec4c51b

View File

@ -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.