Skip to content

Commit

Permalink
keep yarn cache in order not to fetch dependencies when pruning devDe…
Browse files Browse the repository at this point in the history
…pendencies
  • Loading branch information
tekihei2317 committed Apr 21, 2023
1 parent 4855237 commit cb284e4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ save_default_cache_directories() {

if [[ "$YARN" == "true" ]]; then
if [[ -d "$yarn_cache_dir" ]]; then
if [[ "$YARN_2" == "true" ]] && ! node_modules_enabled "$BUILD_DIR"; then
if [[ "$YARN_2" == "true" ]]; then
cp -RTf "$yarn_cache_dir" "$cache_dir/node/cache/yarn"
else
mv "$yarn_cache_dir" "$cache_dir/node/cache/yarn"
Expand Down
2 changes: 1 addition & 1 deletion lib/dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ yarn_prune_devdependencies() {
return 0
fi
if [ -n "$YARN2_FOCUS_WORKSPACE" ]; then
echo "Running 'yarn workspaces focus --production'"
echo "Running yarn workspaces focus --production ${YARN2_FOCUS_WORKSPACE}"
monitor "yarn-prune" yarn workspaces focus --production $YARN2_FOCUS_WORKSPACE
return 0
fi
Expand Down

0 comments on commit cb284e4

Please sign in to comment.