From 350581457faa7b41742f9376a7bc7bd0e94a4d49 Mon Sep 17 00:00:00 2001 From: Michalis Kargakis Date: Fri, 7 Feb 2025 20:08:01 +0100 Subject: [PATCH 1/2] Make set-max-old-space-size.sh compatible with sh The . operator defaults to the current shell and ignores the shebang so in non-bash shells, it is not bash that will be used, which can result in the following script failure: ``` > . scripts/set-max-old-space-size.sh && hardhat test sh: 8: scripts/set-max-old-space-size.sh: [[: not found ``` The shebang could be respected by avoiding sourcing but a better option is to simply remove the bash dependency from the script since it is not required. --- .changeset/wise-candles-rescue.md | 2 ++ scripts/set-max-old-space-size.sh | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 .changeset/wise-candles-rescue.md diff --git a/.changeset/wise-candles-rescue.md b/.changeset/wise-candles-rescue.md new file mode 100644 index 00000000000..a845151cc84 --- /dev/null +++ b/.changeset/wise-candles-rescue.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/scripts/set-max-old-space-size.sh b/scripts/set-max-old-space-size.sh index 525c6786418..f56b11dc3d4 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 From c07517fe25748f03e19420078c13b3cc83c983d4 Mon Sep 17 00:00:00 2001 From: Hadrien Croubois Date: Mon, 10 Feb 2025 10:14:27 +0100 Subject: [PATCH 2/2] Delete .changeset/wise-candles-rescue.md --- .changeset/wise-candles-rescue.md | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .changeset/wise-candles-rescue.md diff --git a/.changeset/wise-candles-rescue.md b/.changeset/wise-candles-rescue.md deleted file mode 100644 index a845151cc84..00000000000 --- a/.changeset/wise-candles-rescue.md +++ /dev/null @@ -1,2 +0,0 @@ ---- ----