diff --git a/packages/melos/lib/src/commands/bootstrap.dart b/packages/melos/lib/src/commands/bootstrap.dart index 00c43090..887f6f35 100644 --- a/packages/melos/lib/src/commands/bootstrap.dart +++ b/packages/melos/lib/src/commands/bootstrap.dart @@ -332,6 +332,14 @@ mixin _BootstrapMixin on _CleanMixin { return didUpdate; } + bool _areDependenciesEqual(DependencyReference? a, DependencyReference? b) { + if (a is GitReference && b is GitReference) { + return a == b && a.path == b.path; + } else { + return a == b; + } + } + int _updateDependencies({ required YamlEditor pubspecEditor, required Map? workspaceDependencies, @@ -343,7 +351,9 @@ mixin _BootstrapMixin on _CleanMixin { // dependencies that have a different version specified in the workspace. final dependenciesToUpdate = workspaceDependencies.entries.where((entry) { if (!packageDependencies.containsKey(entry.key)) return false; - if (packageDependencies[entry.key] == entry.value) return false; + if (_areDependenciesEqual(packageDependencies[entry.key], entry.value)) { + return false; + } return true; });