From 589b3e5978d38db0c46c923bf71c4d8beac8aa1c Mon Sep 17 00:00:00 2001 From: rory Date: Tue, 9 Jul 2024 09:27:17 -0700 Subject: [PATCH] Improve comment on patchPackage wrapper function --- scripts/applyPatches.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index 4345863d13b7..a4be88984561 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -7,11 +7,14 @@ SCRIPTS_DIR=$(dirname "${BASH_SOURCE[0]}") source "$SCRIPTS_DIR/shellUtils.sh" +# Wrapper to run patch-package. +# We use `script` to preserve colorization when the output of patch-package is piped to tee +# and we provide /dev/null to discard the output rather than sending it to a file +# `script` has different syntax on macOS vs linux, so that's why we need a wrapper function function patchPackage { OS="$(uname)" if [[ "$OS" == "Darwin" ]]; then # macOS - # We use script to preserve colorization when the output of patch-package is piped to tee script -q /dev/null npx patch-package --error-on-fail elif [[ "$OS" == "Linux" ]]; then # Ubuntu/Linux