Browse Source

FIX #27 Unable to read .java-version files that contain carriage returns

pull/28/head
David Gageot 13 years ago
parent
commit
ef94d7c0f4
  1. 2
      libexec/jenv-version-file-read

2
libexec/jenv-version-file-read

@ -10,7 +10,7 @@ if [ -e "$VERSION_FILE" ]; then @@ -10,7 +10,7 @@ if [ -e "$VERSION_FILE" ]; then
# Be careful not to load it whole in case there's something crazy in it.
version=""
while read -a words; do
word="${words[0]}"
word="${words[0]/$'\r'/}"
if [ -z "$version" ] && [ -n "$word" ]; then
version="$word"
fi

Loading…
Cancel
Save