1 parent 6d08312 commit c6c65baCopy full SHA for c6c65ba
1 file changed
src/rlang/session.c
@@ -15,7 +15,7 @@ bool r_is_installed(const char* pkg) {
15
static r_obj* has_colour_call = NULL;
16
17
bool r_has_colour(void) {
18
- if (!r_is_installed("crayon")) {
+ if (!r_is_installed("cli")) {
19
return false;
20
}
21
@@ -26,7 +26,7 @@ void r_init_library_session(void) {
26
is_installed_call = r_parse("requireNamespace(x, quietly = TRUE)");
27
r_preserve(is_installed_call);
28
29
- has_colour_call = r_parse("crayon::has_color()");
+ has_colour_call = r_parse("cli::num_ansi_colors() > 1L");
30
r_preserve(has_colour_call);
31
32
0 commit comments