From b64c91114e80671f1430ddc2a35baed7c6de8bd0 Mon Sep 17 00:00:00 2001 From: per1234 Date: Thu, 26 Nov 2020 03:54:51 -0800 Subject: [PATCH] Fix crash when running LibraryPropertiesNameFieldGTRecommendedLength check function A copy/paste error resulted in a crash when the check function was run on a library with invalid library.properties. --- check/checkfunctions/library.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check/checkfunctions/library.go b/check/checkfunctions/library.go index b5a4fa4ebc8..fa844773ee2 100644 --- a/check/checkfunctions/library.go +++ b/check/checkfunctions/library.go @@ -92,7 +92,7 @@ func LibraryPropertiesNameFieldGTMaxLength() (result checkresult.Type, output st // LibraryPropertiesNameFieldGTRecommendedLength checks if the library.properties "name" value is greater than the recommended length. func LibraryPropertiesNameFieldGTRecommendedLength() (result checkresult.Type, output string) { if checkdata.LibraryPropertiesLoadError() != nil { - return checkresult.NotRun, checkdata.LibraryProperties().Get("name") + return checkresult.NotRun, "" } name, ok := checkdata.LibraryProperties().GetOk("name")