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

setup-r-dependencies installs pandoc, even if it is already installed #808

Closed
gaborcsardi opened this issue Feb 29, 2024 · 6 comments
Closed
Labels
bug an unexpected problem or unintended behavior

Comments

@gaborcsardi
Copy link
Member

See https://github.com/rstudio/bookdown/actions/runs/8093487287/job/22116249909?pr=1457#step:8:2978

@gaborcsardi gaborcsardi added the bug an unexpected problem or unintended behavior label Feb 29, 2024
@cderv
Copy link
Contributor

cderv commented Feb 29, 2024

Setting install-pandoc: false did not work 🤔
https://github.com/rstudio/bookdown/actions/runs/8093748312/job/22117001429?pr=1457

So maybe this is something with the outputs handling in the action steps, and Sys.which("pandoc") correctly finds it.

Running simple actions tests shows that Sys.which("pandoc") correctly finds the right action
https://github.com/cderv/test-actions/actions/runs/8093870251/job/22117380020#step:5:23

@cderv
Copy link
Contributor

cderv commented Feb 29, 2024

This would be because the steps.output is a string.

Here is the debug version of previous run
https://github.com/rstudio/bookdown/actions/runs/8093748312/job/22117729189?pr=1457#step:8:9169

From https://docs.github.com/en/actions/learn-github-actions/expressions#operators

steps.<step_id>.outputs.<output_name> evaluates as a string. You need to use specific syntax to tell GitHub to evaluate an expression rather than treat it as a string. For more information, see "Contexts."

So it probably needs a fromJSON or just a if: ${{ steps.check-pandoc.outputs.install == 'true' }}

Hope it helps

@cderv
Copy link
Contributor

cderv commented Feb 29, 2024

Thanks. I am testing the branch following 0ed4cdf - it should fix both issues

@cderv
Copy link
Contributor

cderv commented Feb 29, 2024

The commit fixed both problems. So I don't need install-pandoc: false anymore. pandoc is found on PATH and not installed.

Thank you !

@gaborcsardi
Copy link
Member Author

This is now fixed in @v2.

Copy link

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants