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

Explore setting RStudio prefs with rstudioapi #1733

Closed
wants to merge 1 commit into from

Conversation

hadley
Copy link
Member

@hadley hadley commented Jan 18, 2023

Fixes #1518

}

if (!is_rstudio_project()) {
ui_stop("{ui_value(project_name())} is not an RStudio Project.")
new <- list(...)
Copy link
Member

Choose a reason for hiding this comment

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

I expected to see list2() here re: dynamic dots.

ui_stop("{ui_value(project_name())} is not an RStudio Project.")
new <- list(...)
if (!is_named(new)) {
cli::cli_abort("All arguments in ... must be named")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
cli::cli_abort("All arguments in ... must be named")
cli::cli_abort("All arguments in `...` must be named")

expect_equal(prefs[["save_workspace"]], "never")
expect_false(prefs[["load_workspace"]])
test_that("use_rstudio_config() can get and set prefs", {
use_rstudio_config(custom_pref = 10)
Copy link
Member

Choose a reason for hiding this comment

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

Is this just a stub?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes — this is why this is draft PR and I did not request any reviews 😉

Copy link
Member

Choose a reason for hiding this comment

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

Oh, sorry, I thought you did. I was just responding to a notification like a robot.

@hadley
Copy link
Member Author

hadley commented Jan 25, 2023

Taking a fresh stab at this.

@hadley hadley closed this Jan 25, 2023
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.

Export use_rstudio_config()
2 participants