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

Adapt checking knitr capabilities to .Rprofile that would cat() some value #6167

Merged
merged 3 commits into from
Jul 11, 2023

Conversation

cderv
Copy link
Collaborator

@cderv cderv commented Jul 11, 2023

This closes #6154

The case is a user .Rprofile that would contain some cat() call. This would add some lines in stdout, but we currently expect all the stdout to be our JSON string.

This makes the JSON parsing fails and R reported as not found (while quarto render works ok)

This PR adds special string content that we can match easily to unwrap the JSON content from stdout to check the capabilities.

@jjallaire adding you as review to check this is ok to do that. I believe this is without side effect.

…e values.

This would make `stdout` contain other lines that our expected JSON. To prevent that we wrap our JSON stdout into specific lines, that allows us to unwrap.
@cderv cderv requested a review from jjallaire July 11, 2023 07:46
@jjallaire
Copy link
Collaborator

This approach LGTM! You may want to call the delimiter YAML-LINES as that's the format used here rather than JSON.

@cderv
Copy link
Collaborator Author

cderv commented Jul 11, 2023

Oh indeed. I completely mix it up. I'll change and merge. Thanks !

@cderv cderv merged commit a5a81f5 into main Jul 11, 2023
@cderv cderv deleted the fix/check-knitr-cat-rprofile branch July 11, 2023 13:43
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.

quarto check on command line cannot find R installation if .Rprofile is present
2 participants