Skip to content

Commit

Permalink
Fix resolving check-dir when changing working-directory
Browse files Browse the repository at this point in the history
* Should fix r-lib#614, at least for the typical case where `check-dir` is a relative path.
* `check-dir` is now resolved relative to the working directory, as absolute path to also make it independent of the working directory of subsequent steps were the resolved `check-dir-path` output is used.
  • Loading branch information
riccardoporreca committed Sep 5, 2022
1 parent 7dbac86 commit d8c87d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion check-r-package/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ runs:
## --------------------------------------------------------------------
options(crayon.enabled = TRUE)
if (Sys.getenv("_R_CHECK_FORCE_SUGGESTS_", "") == "") Sys.setenv("_R_CHECK_FORCE_SUGGESTS_" = "false")
cat("##[set-output name=check-dir-path;]", (${{ inputs.check-dir }}), "\n", sep = "")
cat("##[set-output name=check-dir-path;]", file.path(getwd(), (${{ inputs.check-dir }})), "\n", sep = "")
check_results <- rcmdcheck::rcmdcheck(args = (${{ inputs.args }}), build_args = (${{ inputs.build_args }}), error_on = (${{ inputs.error-on }}), check_dir = (${{ inputs.check-dir }}))
shell: Rscript {0}
working-directory: ${{ inputs.working-directory }}
Expand Down

0 comments on commit d8c87d0

Please sign in to comment.