Skip to content

Commit bd7d707

Browse files
authored
Use exec in the CLI shell scripts to prevent new process creation (#3955)
Signed-off-by: Miki <miki@amazon.com>
1 parent ec41f59 commit bd7d707

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
193193
- Bump `styled-components` from 5.3.5 to 5.3.9 ([#3678](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3678))
194194
- Bump `js-yaml` from 3.14.0 to 4.1.0 ([#3770](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3770))
195195
- Bump `oui` from `1.0.0` to `1.1.1` ([#3884](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3884))
196+
- Use `exec` in the CLI shell scripts to prevent new process creation ([#3955](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3955))
196197
- Adding @ZilongX and @Flyingliuhub as maintainers. ([#4137](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/4137))
197198
- Remove timeline application ([#3971](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3971))
198199

scripts/use_node

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ fi
9191
9292
# If a file path was provided for execution, prefix with OSD_HOME; use relative paths to avoid the need for this.
9393
if [ ! -z "$OSD_USE_NODE_JS_FILE_PATH" ]; then
94-
NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS" "${NODE}" "${OSD_HOME}${OSD_USE_NODE_JS_FILE_PATH}" "${@}"
94+
NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS" exec "${NODE}" "${OSD_HOME}${OSD_USE_NODE_JS_FILE_PATH}" "${@}"
9595
elif [ $# -ne 0 ]; then
96-
NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS" "${NODE}" "${@}"
96+
NODE_OPTIONS="$OSD_NODE_OPTS_PREFIX $OSD_NODE_OPTS $NODE_OPTIONS" exec "${NODE}" "${@}"
9797
fi

src/dev/build/tasks/bin/scripts/opensearch-dashboards

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ done
2828
# Get an absolute path for OSD_HOME
2929
OSD_HOME="$(cd "$(dirname "${SCRIPT}")/.."; pwd)"
3030

31-
OSD_NODE_OPTS_PREFIX="--no-warnings --max-http-header-size=65536" OSD_USE_NODE_JS_FILE_PATH=/src/cli/dist NODE_ENV=production ${OSD_HOME}/bin/use_node "${@}"
31+
OSD_NODE_OPTS_PREFIX="--no-warnings --max-http-header-size=65536" OSD_USE_NODE_JS_FILE_PATH=/src/cli/dist NODE_ENV=production exec ${OSD_HOME}/bin/use_node "${@}"

src/dev/build/tasks/bin/scripts/opensearch-dashboards-plugin

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ done
2828
# Get an absolute path for OSD_HOME
2929
OSD_HOME="$(cd "$(dirname "${SCRIPT}")/.."; pwd)"
3030

31-
OSD_NODE_OPTS_PREFIX="--no-warnings" OSD_USE_NODE_JS_FILE_PATH=/src/cli_plugin/dist NODE_ENV=production ${OSD_HOME}/bin/use_node "${@}"
31+
OSD_NODE_OPTS_PREFIX="--no-warnings" OSD_USE_NODE_JS_FILE_PATH=/src/cli_plugin/dist NODE_ENV=production exec ${OSD_HOME}/bin/use_node "${@}"

0 commit comments

Comments
 (0)