Skip to content

Commit

Permalink
Improve comment on patchPackage wrapper function
Browse files Browse the repository at this point in the history
  • Loading branch information
roryabraham committed Jul 9, 2024
1 parent 331bc7e commit 589b3e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/applyPatches.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 589b3e5

Please sign in to comment.