From a9287be16877b193f68a4556ba4efba7ec998aec Mon Sep 17 00:00:00 2001 From: Paul Lietar Date: Mon, 22 Jan 2024 17:47:56 +0000 Subject: [PATCH] Format fix --- R/interactive.R | 5 ++--- R/util.R | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/R/interactive.R b/R/interactive.R index a6e26618..e30a814b 100644 --- a/R/interactive.R +++ b/R/interactive.R @@ -23,8 +23,7 @@ rstudio_get_current_active_editor_path <- function() { ## draft directory too. detect_orderly_interactive_path <- function( path = getwd(), - editor_path = rstudio_get_current_active_editor_path()) -{ + editor_path = rstudio_get_current_active_editor_path()) { is_valid <- is_plausible_orderly_report(path) suggested_wd <- NULL if (!is.null(editor_path)) { @@ -54,7 +53,7 @@ detect_orderly_interactive_path <- function( cli::format_inline(paste( "Working directory {.path {path}} does not match the report currently", "open in RStudio.")), - i=cli::format_inline(paste( + i = cli::format_inline(paste( "Use {.code setwd({.str {suggested_wd}})}", "to switch working directories."))) rlang::warn(msg, use_cli_format = TRUE) diff --git a/R/util.R b/R/util.R index 7b9640fc..4178fb8b 100644 --- a/R/util.R +++ b/R/util.R @@ -641,6 +641,6 @@ paths_are_identical <- function(x, y) { is_testing <- function() { # Copied from testthat, to avoid having the package as a run-time dependency. - # https://github.com/r-lib/testthat/blob/fe50a222c62cc8733b397690caf3b2a95856f902/R/test-env.R#L20 + # https://github.com/r-lib/testthat/blob/fe50a22/R/test-env.R#L20 identical(Sys.getenv("TESTTHAT"), "true") }