You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
check_name: correctly handle "/" in library.properties name value
Previously, when the library.properties name value contained "/", the check incorrectly passed, and only the part of the name value following "/" was checked, because it was assumed to be a path separator.
# Library Manager installs libraries to a folder that is the name field value with any spaces replaced with _
1754
-
local libraryManagerFolderName="${nameValue///_}"
1755
-
check_folder_name "$libraryManagerFolderName"
1756
-
local checkFolderNameExitStatus=$?
1757
-
if [[ $checkFolderNameExitStatus-ne$ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]];then
1758
-
echo"WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format"
1759
-
fi
1760
-
1761
-
# Check if the library.properties name value starts with "arduino" (case-insensitive)
1762
1768
check_library_properties_name "$nameValue"
1763
1769
local checkLibraryPropertiesNameExitStatus=$?
1764
-
if [[ "$checkLibraryPropertiesNameExitStatus"=="$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]];then
1765
-
echo"WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries. Libraries using a reserved name will not be accepted in the Library Manager index."
1770
+
if [[ $checkLibraryPropertiesNameExitStatus-ne$ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]];then
1771
+
if [[ "$checkLibraryPropertiesNameExitStatus"=="$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]];then
1772
+
echo"WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries. Libraries using a reserved name will not be accepted in the Library Manager index."
1773
+
else
1774
+
echo"WARNING: ${normalizedLibraryPropertiesPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format"
1775
+
fi
1766
1776
fi
1767
1777
fi
1768
1778
fi
@@ -2368,22 +2378,17 @@ function check_library_manager_compliance() {
# Check for characters in the library.properties name value disallowed by the Library Manager indexer
2372
-
# Library Manager installs libraries to a folder that is the name field value with any spaces replaced with _
2373
-
local -r libraryManagerFolderName="${nameValue///_}"
2374
-
check_folder_name "$libraryManagerFolderName"
2375
-
local -r checkFolderNameExitStatus=$?
2376
-
if [[ $checkFolderNameExitStatus-ne$ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]];then
2377
-
echo"ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format"
# Check if the library.properties name value starts with "arduino" (case-insensitive)
2381
+
# Check if the library.properties name value meets the requirements of the Library Manager indexer
2382
2382
check_library_properties_name "$nameValue"
2383
-
local checkLibraryPropertiesNameExitStatus=$?
2384
-
if [[ "$checkLibraryPropertiesNameExitStatus"=="$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]];then
2385
-
echo"ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries."
if [[ $checkLibraryPropertiesNameExitStatus-ne$ARDUINO_CI_SCRIPT_SUCCESS_EXIT_STATUS ]];then
2385
+
if [[ "$checkLibraryPropertiesNameExitStatus"=="$ARDUINO_CI_SCRIPT_CHECK_LIBRARY_PROPERTIES_NAME_RESERVED_NAME_EXIT_STATUS" ]];then
2386
+
echo"ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue starts with \"arduino\". These names are reserved for official Arduino libraries."
echo"ERROR: ${normalizedLibraryPath}/library.properties: name value: $nameValue does not meet the requirements of the Arduino Library Manager indexer. See: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#libraryproperties-file-format"
0 commit comments