flutter.buildFlutterApplication: Add an explanation when a pubspec mismatch occurs

This commit is contained in:
gilice 2023-04-16 00:31:12 +10:00 committed by hacker1024
parent 915a6779fc
commit 4e68ee327e

View File

@ -38,5 +38,9 @@ _setupPubCache() {
# Sometimes the pubspec.lock will get opened in write mode, even when offline.
chmod u+w pubspec.lock
fi
diff -u pubspec.yaml "$deps/pubspec/pubspec.yaml"
if ! diff -u pubspec.yaml "$deps/pubspec/pubspec.yaml"; then
echo 1>&2 -e 'The pubspec.yaml of the project derivation differs from the one in the dependency derivation.' \
'\nYou most likely forgot to update the vendorHash while updating the sources.'
exit 1
fi
}