fix: JDK missing if this platform is not targeted
This commit is contained in:
parent
79f07a5e01
commit
4a955c78f4
10
warp4j
10
warp4j
@ -242,6 +242,14 @@ function choose_distro_type() {
|
|||||||
# actually choose distro type
|
# actually choose distro type
|
||||||
JAVA_DISTRO_TYPE=$(choose_distro_type)
|
JAVA_DISTRO_TYPE=$(choose_distro_type)
|
||||||
|
|
||||||
|
# even if this platform is not targeted, we still need
|
||||||
|
# a JDK for this platform to optimize JDKs for other platforms
|
||||||
|
TARGETS_TO_CACHE=${TARGETS[@]}
|
||||||
|
if [[ $JAVA_DISTRO_TYPE == $DISTRO_TYPE_JDK ]] && # if usind JDK (not JRE)
|
||||||
|
[[ ${TARGETS[@]} != *"$THIS_PLATFORM"* ]]; then # and this platform is not targeted
|
||||||
|
TARGETS_TO_CACHE+=($THIS_PLATFORM)
|
||||||
|
fi
|
||||||
|
|
||||||
# choose cache path for this platform
|
# choose cache path for this platform
|
||||||
case $THIS_PLATFORM in
|
case $THIS_PLATFORM in
|
||||||
$MAC) CACHE_PATH="$HOME/Library/Application Support/warp4j" ;;
|
$MAC) CACHE_PATH="$HOME/Library/Application Support/warp4j" ;;
|
||||||
@ -453,7 +461,7 @@ function ensure_distro_cached() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# actually ensure required distro is in cache
|
# actually ensure required distro is in cache
|
||||||
for target in ${TARGETS[@]}; do
|
for target in ${TARGETS_TO_CACHE[@]}; do
|
||||||
ensure_distro_cached $target
|
ensure_distro_cached $target
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user