Trim spaces around k and v in build.properties to be more forgiving.

This commit is contained in:
Michael Sesterhenn 2024-06-20 13:07:44 -05:00
parent 586e0a752c
commit 678fe9d204
1 changed files with 3 additions and 0 deletions

3
sbt
View File

@ -707,6 +707,9 @@ loadConfigFile() {
}
loadPropFile() {
# trim key and value so as to be more forgiving with spaces around the '=':
k=$(echo $k |sed -e 's/^\s*(.+)\s*$/\\1/g')
v=$(echo $v |sed -e 's/^\s*(.+)\s*$/\\1/g')
while IFS='=' read -r k v; do
if [[ "$k" == "sbt.version" ]]; then
build_props_sbt_version="$v"