Browse Source

Make set-max-old-space-size.sh compatible with sh (#5493)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Michalis Kargakis 8 tháng trước cách đây
mục cha
commit
f4237626c2
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      scripts/set-max-old-space-size.sh

+ 2 - 2
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