Skip to content

Commit

Permalink
Make set-max-old-space-size.sh compatible with sh (#5493)
Browse files Browse the repository at this point in the history
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
  • Loading branch information
0xmichalis and Amxx authored Feb 10, 2025
1 parent 3658269 commit f423762
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/set-max-old-space-size.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit f423762

Please sign in to comment.