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

Generating favicons produces "Path exists and overwrite is FALSE" error with devel-pkgdown #2553

Closed
IndrajeetPatil opened this issue May 17, 2024 · 5 comments · Fixed by #2563

Comments

@IndrajeetPatil
Copy link
Contributor

CI logs: https://github.com/IndrajeetPatil/statsExpressions/actions/runs/9120963709/job/25079334023?pr=279

── Building favicons ───────────────────────────────────────────────────────────
ℹ Building favicons with <https://realfavicongenerator.net/> ...
Error: Error: Path exists and overwrite is FALSE
@hadley
Copy link
Member

hadley commented May 17, 2024

There are two problems here:

  • build_favicons() shouldn't be run by default in CI
  • If you do manually run it, you shouldn't get that error

@IndrajeetPatil
Copy link
Contributor Author

I am not manually running this step in CI, it is run as part of pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE); I am using the standard pkgdown GHA workflow.

The workflow has been working with devel-pkgdown fine for a long time; the change in behaviour seems to be related to changes made in 350854a#diff-26463c4a1c19b09efab07b1bf9d404f4103a028f98a8cd2dd0f810bded97cee0.


Here is a minimal reprex showing how that change is not backward-compatible:

Before

tmp <- tempfile()
on.exit(unlink(tmp))
result <- httr::RETRY(
  "GET",
  "http://httpbin.org/status/200",
  httr::write_disk(tmp),
  quiet = TRUE
)

Created on 2024-05-17 with reprex v2.1.0

After

tmp <- withr::local_tempdir()
result <- httr::RETRY(
  "GET",
  "http://httpbin.org/status/200",
  httr::write_disk(tmp),
  quiet = TRUE
)
#> Error: Path exists and overwrite is FALSE

Created on 2024-05-17 with reprex v2.1.0

@hadley
Copy link
Member

hadley commented May 17, 2024

GHA = CI

@IndrajeetPatil
Copy link
Contributor Author

Yes, I am aware. I have a 100-page slidedeck on how to use GHA/CI for effective R package development.

@IndrajeetPatil
Copy link
Contributor Author

A workaround here is to just store the favicons in pkgdown/favicon folder so that the pkgdown workflow doesn't need to generate it each time, sidestepping the current issue.

@hadley hadley reopened this May 17, 2024
IndrajeetPatil added a commit to easystats/workflows that referenced this issue May 19, 2024
hadley added a commit that referenced this issue May 20, 2024
And fix bug introduced by use of fs everywhere. Fixes #2553.

Tested by re-buidling pkgdown's favicons.
hadley added a commit that referenced this issue May 20, 2024
And fix bug introduced by use of fs everywhere. Fixes #2553.

Tested by re-buidling pkgdown's favicons.
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this issue Jun 1, 2024
And fix bug introduced by use of fs everywhere. Fixes r-lib#2553.

Tested by re-buidling pkgdown's favicons.
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 a pull request may close this issue.

2 participants