Skip to content

Commit d114e8d

Browse files
author
David Beaumont
committed
8375649: idea.sh script adds source paths in a single, enormous, line to jdk.iml
Reviewed-by: erikj, liach
1 parent 23a08ee commit d114e8d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

bin/idea.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,18 @@ fi
187187
SOURCE_PREFIX="<sourceFolder url=\"file://"
188188
SOURCE_POSTFIX="\" isTestSource=\"false\" />"
189189

190+
# SOURCES is a single string containing embeded newlines.
190191
for root in $MODULE_ROOTS; do
191192
if [ "x$CYGPATH" != "x" ]; then
192193
root=`$CYGPATH -am $root`
193194
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
194195
root=`wslpath -am $root`
195196
fi
196-
197-
SOURCES=$SOURCES" $SOURCE_PREFIX""$root""$SOURCE_POSTFIX"
197+
# Add line termination/indentation for everything after the first entry.
198+
if [ "x$SOURCES" != "x" ]; then
199+
SOURCES="${SOURCES}\n "
200+
fi
201+
SOURCES="${SOURCES}${SOURCE_PREFIX}${root}${SOURCE_POSTFIX}"
198202
done
199203

200204
add_replacement "###SOURCE_ROOTS###" "$SOURCES"

0 commit comments

Comments
 (0)