这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion turborepo-tests/helpers/setup_package_manager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,10 @@ else
COREPACK_INSTALL_DIR_CMD="--install-directory=${COREPACK_INSTALL_DIR}"
fi

# get just the packageManager name, without the version
# We pass the name to corepack enable so that it will work for npm also.
# `corepack enable` with no specified packageManager does not work for npm.
pkgManagerName="${pkgManager%%@*}"

# Enable corepack so that the packageManager setting in package.json is respected.
corepack enable "${COREPACK_INSTALL_DIR_CMD}"
corepack enable $pkgManagerName "${COREPACK_INSTALL_DIR_CMD}"
Loading