diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml index 7e3a3f5..287507a 100644 --- a/.github/workflows/deps.yml +++ b/.github/workflows/deps.yml @@ -46,9 +46,12 @@ jobs: - name: Install package dependencies 📄 run: | if (file.exists(${{ env.dep_path }})) { - yaml::yaml.load(readLines(${{ env.dep_path }}))$dependencies |> - sapply(function(x) x$repo) |> - pak::pak(dependencies = TRUE, ask = FALSE, upgrade = FALSE) - } + repos <- yaml::yaml.load(readLines(${{ env.dep_path }}))$dependencies |> + sapply(function(x) x$repo) + if(repos |> length() > 0) { + repos |> + pak::pak(dependencies = TRUE, ask = FALSE, upgrade = FALSE) + } + } shell: Rscript {0}