Skip to content

Commit

Permalink
Enable corepack if packageManager is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
fcollonval authored Jun 17, 2024
1 parent b92970e commit c7404e7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/actions/base-setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ runs:
id: yarn-cache-dir-path
shell: bash
run: |
# Enable corepack if the project defines packageManager
if [ -f package.json ]; then
export HAS_PKG_MANAGER=$(grep -e \"packageManager\"\: package.json)
if [ ! -z "$HAS_PKG_MANAGER" ]; then corepack enable; fi
fi
CACHE_DIR=$(yarn config get cacheFolder)
[[ "$CACHE_DIR" == "undefined" ]] && CACHE_DIR=$(yarn cache dir)
echo "dir=$CACHE_DIR" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit c7404e7

Please sign in to comment.