Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

render_scorecard: fix recent regression in relative path handling #72

Merged
merged 2 commits into from
Aug 27, 2024

Conversation

kyleam
Copy link
Collaborator

@kyleam kyleam commented Aug 27, 2024

This PR fixes breakage that @barrettk noticed when calling our internal score-r-pkg script and telling it to use a recent mpn.scorecard commit (a0efd0a). See the first commit's message for details.

I threw in the second commit to bump to a dev version. That's something I need for bbi and pkgr. (No plans to tag it unless someone requests it.)

kyleam added 2 commits August 27, 2024 13:38
As aa2cb8f (render_scorecard: move preparation of params to dedicated
function, 2024-08-06), a function call instead of an inline list(...)
is passed to rmarkdown::render() as the params argument.  That change
breaks the handling of relative paths for results_dir because render()
evaluates the params argument after changing the working directory.

Move the function call outside of the rmarkdown::render() call to fix
the handling of relative paths.
@kyleam kyleam requested a review from barrettk August 27, 2024 17:43
Copy link
Collaborator

@barrettk barrettk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that makes sense - doesnt evaluate until the object is called. Glad we have a test for this now and thanks for making a PR

@kyleam kyleam merged commit a4ffca8 into main Aug 27, 2024
5 checks passed
@kyleam kyleam deleted the render-relpath-fix branch August 27, 2024 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants