From c0742330662264c686563c2a8c08cc7b23117de4 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Tue, 10 Jun 2025 17:02:31 -0700 Subject: [PATCH] sanity check for crayon being installed before using it --- R/utils.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/utils.R b/R/utils.R index 49d46e284..9f3f74c60 100644 --- a/R/utils.R +++ b/R/utils.R @@ -162,7 +162,7 @@ on_load({ }) style_dim_soft <- function(x) { - if (cli::num_ansi_colors() >= 256) { + if (cli::num_ansi_colors() >= 256 && is_installed("crayon")) { crayon::make_style(grDevices::grey(0.6), colors = 256)(x) } else { col_silver(x)