Files
openzeppelin-contracts/scripts/set-max-old-space-size.sh
2024-12-19 11:13:55 +01:00

11 lines
324 B
Bash
Executable File

#!/usr/bin/env bash
# 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
export NODE_OPTIONS="${NODE_OPTIONS} --max-old-space-size=8192"
fi