From 313ace9e2b228df2630818a00e967a640457a020 Mon Sep 17 00:00:00 2001 From: Jenny Bryan Date: Fri, 5 Jul 2024 16:14:42 -0700 Subject: [PATCH] Don't nag about styler unless `style` is TRUE Closes #461 --- R/reprex_impl.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/reprex_impl.R b/R/reprex_impl.R index 81e677a3..462dc201 100644 --- a/R/reprex_impl.R +++ b/R/reprex_impl.R @@ -127,7 +127,7 @@ set_advertise <- function(advertise, venue) { } style_requires_styler <- function(style) { - if (!requireNamespace("styler", quietly = TRUE)) { + if (isTRUE(style) && !requireNamespace("styler", quietly = TRUE)) { reprex_danger(" Install the {.pkg styler} package in order to use {.code style = TRUE}.")