From f4237626c2e107f120783a15e7820e60bc73b2d8 Mon Sep 17 00:00:00 2001 From: Michalis Kargakis Date: Mon, 10 Feb 2025 18:24:02 +0100 Subject: [PATCH] Make set-max-old-space-size.sh compatible with sh (#5493) Co-authored-by: Hadrien Croubois --- scripts/set-max-old-space-size.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/set-max-old-space-size.sh b/scripts/set-max-old-space-size.sh index 525c67864..f56b11dc3 100755 --- a/scripts/set-max-old-space-size.sh +++ b/scripts/set-max-old-space-size.sh @@ -1,10 +1,10 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # This script sets the node `--max-old-space-size` to 8192 if it is not set already. # All existing `NODE_OPTIONS` are retained as is. export NODE_OPTIONS="${NODE_OPTIONS:-}" -if [[ $NODE_OPTIONS != *"--max-old-space-size"* ]]; then +if [ "${NODE_OPTIONS##*--max-old-space-size*}" = "$NODE_OPTIONS" ]; then export NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=8192" fi