Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace yarn cache rather than nest it #985

Merged
merged 2 commits into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## main

- Fix issue with nested yarn caches and cache growth ([#985](https://github.com/heroku/heroku-buildpack-nodejs/pull/985))

## v191 (2022-02-14)
- Improve support for yarn 2+ installs ([#978](https://github.com/heroku/heroku-buildpack-nodejs/pull/978)

Expand Down
2 changes: 1 addition & 1 deletion lib/cache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ save_default_cache_directories() {
if [[ $(features_get "cache-native-yarn-cache") == "true" ]] && [[ "$YARN" == "true" ]]; then
if [[ -d "$yarn_cache_dir" ]]; then
if [[ "$YARN_2" == "true" ]] && ! node_modules_enabled "$BUILD_DIR"; then
cp -R "$yarn_cache_dir" "$cache_dir/node/cache/yarn"
cp -RTf "$yarn_cache_dir" "$cache_dir/node/cache/yarn"
else
mv "$yarn_cache_dir" "$cache_dir/node/cache/yarn"
fi
Expand Down