[flutter_tools] ensure linux doctor validator finishes when pkg-config is not installed (#103755)

This commit is contained in:
Christopher Fujino
2022-05-13 18:24:13 -07:00
committed by GitHub
parent 4f96419612
commit 4c417884c2
2 changed files with 26 additions and 0 deletions

View File

@@ -127,6 +127,8 @@ class LinuxDoctorValidator extends DoctorValidator {
final _VersionInfo? version = installedVersions[kPkgConfigBinary];
if (version == null || version.number == null) {
messages.add(ValidationMessage.error(_userMessages.pkgConfigMissing));
// Exit early because we cannot validate libraries without pkg-config.
return ValidationResult(validationType, messages);
} else {
assert(_requiredBinaryVersions.containsKey(kPkgConfigBinary));
// The full version description is just the number, so add context.