Skip to content

Commit fc97893

Browse files
fonspKristofferC
authored andcommitted
Pkg: Allow configuring can_fancyprint(io::IO) using IOContext (#58887)
(cherry picked from commit c0cc1e1)
1 parent 17c8d96 commit fc97893

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/precompilation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ Base.show(io::IO, err::PkgPrecompileError) = print(io, "PkgPrecompileError: ", e
342342

343343
import Base: StaleCacheKey
344344

345-
can_fancyprint(io::IO) = io isa Base.TTY && (get(ENV, "CI", nothing) != "true")
345+
can_fancyprint(io::IO) = @something(get(io, :force_fancyprint, nothing), (io isa Base.TTY && (get(ENV, "CI", nothing) != "true")))
346346

347347
function printpkgstyle(io, header, msg; color=:light_green)
348348
printstyled(io, header; color, bold=true)

0 commit comments

Comments
 (0)