Skip to content

Commit f60e44b

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

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
@@ -355,7 +355,7 @@ Base.show(io::IO, err::PkgPrecompileError) = print(io, "PkgPrecompileError: ", e
355355

356356
import Base: StaleCacheKey
357357

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

360360
function printpkgstyle(io, header, msg; color=:green)
361361
printstyled(io, header; color, bold=true)

0 commit comments

Comments
 (0)