From 2f8349e6bb2d252655b18d0789c362729b048b61 Mon Sep 17 00:00:00 2001 From: Riccardo Porreca Date: Mon, 15 Jan 2024 19:53:19 +0100 Subject: [PATCH] Refactor remotes-based system dependencies in a more compact form --- .github/workflows/ci-cd-renv.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci-cd-renv.yml b/.github/workflows/ci-cd-renv.yml index 17d2885..bfca2ee 100644 --- a/.github/workflows/ci-cd-renv.yml +++ b/.github/workflows/ci-cd-renv.yml @@ -51,10 +51,9 @@ jobs: # Package distro used to get the distro for the used ubuntu-latest run: | Rscript -e "install.packages(c('remotes', 'distro'))" - while read -r cmd - do - eval sudo $cmd - done < <(Rscript -e 'writeLines(with(distro::distro(), remotes::system_requirements(id, short_version)))') + SYSTEM_REQUIREMENTS='with(distro::distro(), remotes::system_requirements(id, short_version))' + while read -r cmd; do echo sudo $cmd && eval sudo $cmd + done < <(Rscript -e "writeLines($SYSTEM_REQUIREMENTS)") - name: Activate renv and restore packages with cache uses: r-lib/actions/setup-renv@v2