Skip to content

Commit

Permalink
Merge pull request #251 from zowe/bugfix/v2/nodev14
Browse files Browse the repository at this point in the history
Fix older v14 support
  • Loading branch information
1000TurquoisePogs authored Feb 23, 2023
2 parents cd64418 + 2f8c8ad commit 2329342
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bin/app-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,18 @@ else
ZLUX_SERVER_FILE=zluxServer.js
fi

# Tells node whether to prefer ipv4 or ipv6 results to DNS lookups
ZLUX_DNS_ORDER="--dns-result-order=ipv4first"
if [ "$ZWE_components_app_server_dns_lookupOrder" = "ipv6" ]; then
ZLUX_DNS_ORDER="--dns-result-order=verbatim"
fi

# not all versions of node support the above (14.18+ generally) so we can just try it to see what happens.
v4_check=$(${NODE_BIN} ${ZLUX_DNS_ORDER} -e "console.log('success');")
if [ "${v4_check}" != "success" ]; then
ZLUX_DNS_ORDER=
fi

if [ -z "$ZLUX_NO_LOGFILE" ]; then
__UNTAGGED_READ_MODE=V6 \
_BPX_JOBNAME=${ZOWE_PREFIX}DS \
Expand Down

0 comments on commit 2329342

Please sign in to comment.