From 591e59f5f09f93daa3cc0ce90b57b4b4ac8a1d34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-David=20Collin?= Date: Thu, 10 Oct 2024 11:05:42 +0200 Subject: [PATCH] for renv take into account the case where renv dir does not exist --- .github/workflows/global-env.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/global-env.yml b/.github/workflows/global-env.yml index 00ca591..a61f15d 100644 --- a/.github/workflows/global-env.yml +++ b/.github/workflows/global-env.yml @@ -51,7 +51,11 @@ jobs: echo "r=true" >> $GITHUB_OUTPUT echo "${{ env.paths-r }}" >> paths.sh cat renv.lock >> tohash.txt - ln -s $GITHUB_WORKSPACE/renv /home/runner/work/_temp + if [ -d renv ]; then + ln -s $GITHUB_WORKSPACE/renv /home/runner/work/_temp + else + mkdir /home/runner/work/_temp/renv + fi fi cachepath=$(jq -crRs '@json' <<< "$(cat paths.sh)")