Skip to content

Commit f423762

Browse files
0xmichalisAmxx
andauthored
Make set-max-old-space-size.sh compatible with sh (#5493)
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
1 parent 3658269 commit f423762

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/set-max-old-space-size.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env sh
22

33
# This script sets the node `--max-old-space-size` to 8192 if it is not set already.
44
# All existing `NODE_OPTIONS` are retained as is.
55

66
export NODE_OPTIONS="${NODE_OPTIONS:-}"
77

8-
if [[ $NODE_OPTIONS != *"--max-old-space-size"* ]]; then
8+
if [ "${NODE_OPTIONS##*--max-old-space-size*}" = "$NODE_OPTIONS" ]; then
99
export NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=8192"
1010
fi

0 commit comments

Comments
 (0)