Skip to content

Commit 3cd3a77

Browse files
Remove trailing newline from version file if necessary (#27)
* Remove trailing newline from version file if necessary This fixes the first part of #25, as this could lead to invalid multiline build recipes * Changed regex to cmake string strip function
1 parent 71f2811 commit 3cd3a77

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
@@ -101,6 +101,7 @@ function (SetupBoardToolchain)
101101
set(_path "${ARDUINO_TOOLCHAIN_DIR}")
102102
if (EXISTS "${ARDUINO_INSTALL_PATH}/lib/version.txt")
103103
file(READ "${ARDUINO_INSTALL_PATH}/lib/version.txt" _version)
104+
string(STRIP "${_version}" _version)
104105
if(_version)
105106
set(_path "${ARDUINO_INSTALL_PATH}")
106107
string(REPLACE "." "0" _version "${_version}")

0 commit comments

Comments
 (0)