Skip to content

Commit 82ef114

Browse files
authored
arduino version.txt contains extra characters which are truncated from -DARDUINO= (technyon#8)
1 parent 3c624d2 commit 82ef114

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Arduino/System/BoardToolchain.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ function (SetupBoardToolchain)
102102
if (EXISTS "${ARDUINO_INSTALL_PATH}/lib/version.txt")
103103
file(READ "${ARDUINO_INSTALL_PATH}/lib/version.txt" _version)
104104
string(STRIP "${_version}" _version)
105+
string(REGEX REPLACE "^([0-9.]+).*" "\\1" _version "${_version}") # added to truncate "1.8.19+dfsg1-1" to "1.8.19"
105106
if(_version)
106107
set(_path "${ARDUINO_INSTALL_PATH}")
107108
string(REPLACE "." "0" _version "${_version}")

0 commit comments

Comments
 (0)