Skip to content

Commit

Permalink
set version only if not empty
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Feb 17, 2015
1 parent 672b217 commit c0338f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion jvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ _jvm-discover-and-set() {
if [ -z "$version" ] && [ -f .java-version ]; then
local version="$(cat .java-version)"
fi
_jvm_set-java-path "$version"
[ ! -z "$version" ] && _jvm_set-java-path "$version"
}

if [ ! -z "$BASH" ]; then
Expand Down

0 comments on commit c0338f2

Please sign in to comment.