Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Commit 4dbcb17

Browse files
committed
Cache the target directory only when a cargo file exists.
Signed-off-by: David Calavera <david.calavera@gmail.com>
1 parent f009c3b commit 4dbcb17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

run-build-functions.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,11 @@ cache_artifacts() {
675675
cache_cwd_directory ".venv" "python virtualenv"
676676
cache_cwd_directory ".build" "swift build"
677677
cache_cwd_directory ".netlify/plugins" "build plugins"
678-
cache_cwd_directory "target" "rust compile output"
678+
679+
if [ -f Cargo.toml ] || [ -f Cargo.lock ]
680+
then
681+
cache_cwd_directory "target" "rust compile output"
682+
fi
679683

680684
cache_home_directory ".yarn_cache" "yarn cache"
681685
cache_home_directory ".cache/pip" "pip cache"

0 commit comments

Comments
 (0)