Skip to content

Commit

Permalink
fix(turborepo): Set corepack dir for examples (#5539)
Browse files Browse the repository at this point in the history
### Description

- set a corepack install directory per example to avoid concurrency
issues
 - set the `PATH` for the test to include the corepack directory

### Testing Instructions

Examples tests

---------

Co-authored-by: Greg Soltis <Greg Soltis>
  • Loading branch information
Greg Soltis committed Jul 17, 2023
1 parent 46d0945 commit d24075f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion examples-tests/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d24075f

Please sign in to comment.