diff --git a/scripts/applyPatches.sh b/scripts/applyPatches.sh index 4ce023755258..a93555fb992c 100755 --- a/scripts/applyPatches.sh +++ b/scripts/applyPatches.sh @@ -11,7 +11,7 @@ source "$SCRIPTS_DIR/shellUtils.sh" function patchPackage { OS="$(uname)" if [[ "$OS" == "Darwin" || "$OS" == "Linux" ]]; then - npx patch-package --error-on-fail --color=always + npx patch-package --error-on-fail --color=always || (echo 'Patch failed, reinstalling node_modules...' && npm ci && patch-package --error-on-fail --color=always) else error "Unsupported OS: $OS" exit 1