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

[FR] Return build outcome from build_site()? #766

Open
LukasWallrich opened this issue Sep 9, 2024 · 1 comment
Open

[FR] Return build outcome from build_site()? #766

LukasWallrich opened this issue Sep 9, 2024 · 1 comment

Comments

@LukasWallrich
Copy link

Maybe I am being silly, but I struggle to write a condition that checks whether blogdown::build_site() was successful (to then decide whether to deploy). The function always returns NULL, and Hugo errors are not raised as R errors (or warnings).

Could the function possibly return TRUE/FALSE (invisibly) depending on whether the hugo build succeeded? Or is there already a solution that I am overlooking? (So far, I tried capture.output() but that also returns nothing.)

@LukasWallrich
Copy link
Author

I now realized that blogdown::hugo_build() returns the status code, so this is easy to solve by splitting this into two function calls - however, it would still be nice (and arguably more consistent) to get this straight from build_site()?

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

No branches or pull requests

1 participant