From 5001006a68293e60ec4a92374e8cd33189bf8b19 Mon Sep 17 00:00:00 2001 From: hackacad Date: Tue, 27 Jul 2021 15:20:27 +0200 Subject: [PATCH] [1.x] FreeBSD Node support Backport PR: https://github.com/opensearch-project/OpenSearch-Dashboards/pull/678 Signed-off-by: hackacad --- src/dev/build/tasks/bin/scripts/opensearch-dashboards | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/dev/build/tasks/bin/scripts/opensearch-dashboards b/src/dev/build/tasks/bin/scripts/opensearch-dashboards index 56c22eb268c4..d354a9778d36 100755 --- a/src/dev/build/tasks/bin/scripts/opensearch-dashboards +++ b/src/dev/build/tasks/bin/scripts/opensearch-dashboards @@ -15,8 +15,13 @@ done DIR="$(dirname "${SCRIPT}")/.." CONFIG_DIR=${OSD_PATH_CONF:-"$DIR/config"} -NODE="${DIR}/node/bin/node" -test -x "$NODE" + +if [ -x "${DIR}/node/bin/node" ]; then + NODE="/usr/local/bin/node" +else + NODE="$(which node)" +fi + if [ ! -x "$NODE" ]; then echo "unable to find usable node.js executable." exit 1