diff --git a/examples-tests/setup.sh b/examples-tests/setup.sh index 730fdff876666..604817046c11f 100644 --- a/examples-tests/setup.sh +++ b/examples-tests/setup.sh @@ -36,7 +36,15 @@ function set_package_manager() { } # Enable corepack so that when we set the packageManager in package.json it actually makes a diference. -corepack enable +if [ "$PRYSK_TEMP" == "" ]; then + COREPACK_INSTALL_DIR_CMD= +else + COREPACK_INSTALL_DIR="${PRYSK_TEMP}/corepack" + mkdir -p "${COREPACK_INSTALL_DIR}" + export PATH=${COREPACK_INSTALL_DIR}:$PATH + COREPACK_INSTALL_DIR_CMD="--install-directory=${COREPACK_INSTALL_DIR}" +fi +corepack enable "${COREPACK_INSTALL_DIR_CMD}" # Set the packageManger version NPM_PACKAGE_MANAGER_VALUE="npm@8.1.2"