Skip to content

Commit 7174b12

Browse files
committed
🐛 Respect the constraint in the pubspec.yaml first
1 parent d0045b0 commit 7174b12

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/core/lib/settings/config.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ Config loadPubspecConfig(File pubspecFile, {File? buildFile}) {
108108
};
109109
final pubspecLockMap = loadYaml(pubspecLockContent) as YamlMap?;
110110
if (safeCast<String>(pubspecLockMap?['sdks']?['dart']) case final sdk?) {
111-
sdkConstraint = VersionConstraint.parse(sdk);
111+
sdkConstraint ??= VersionConstraint.parse(sdk);
112112
}
113113

114114
final analysisOptionsFile = File(

0 commit comments

Comments
 (0)