Skip to content

Commit

Permalink
Allow configuring can_fancyprint(io::IO) using IOContext
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Oct 11, 2024
1 parent 3f8471f commit 289e558
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ stdout_f() = something(DEFAULT_IO[], unstableio(stdout))
const PREV_ENV_PATH = Ref{String}("")

usable_io(io) = (io isa Base.TTY) || (io isa IOContext{IO} && io.io isa Base.TTY)
can_fancyprint(io::IO) = (usable_io(io)) && (get(ENV, "CI", nothing) != "true")
can_fancyprint(io::IO) = @something get(io, :Pkg_force_fancyprint, nothing) (usable_io(io)) && (get(ENV, "CI", nothing) != "true")
should_autoprecompile() = Base.JLOptions().use_compiled_modules == 1 && Base.get_bool_env("JULIA_PKG_PRECOMPILE_AUTO", true)

include("utils.jl")
Expand Down

0 comments on commit 289e558

Please sign in to comment.