Skip to content

Commit

Permalink
fix artifact printing quiet rule (#3951)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Jul 15, 2024
1 parent 046df8c commit d801e45
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/Operations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ using Base.BinaryPlatforms
import ...Pkg
import ...Pkg: pkg_server, Registry, pathrepr, can_fancyprint, printpkgstyle, stderr_f, OFFLINE_MODE
import ...Pkg: UPDATED_REGISTRY_THIS_SESSION, RESPECT_SYSIMAGE_VERSIONS, should_autoprecompile
import ...Pkg: usable_io

#########
# Utils #
Expand Down Expand Up @@ -830,7 +831,7 @@ function download_artifacts(env::EnvCache;
# For each Artifacts.toml, install each artifact we've collected from it
for name in keys(artifacts)
ensure_artifact_installed(name, artifacts[name], artifacts_toml;
verbose, quiet_download=!(io isa Base.TTY), io=io)
verbose, quiet_download=!(usable_io(io)), io=io)
end
write_env_usage(artifacts_toml, "artifact_usage.toml")
end
Expand Down
3 changes: 2 additions & 1 deletion src/Pkg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ stderr_f() = something(DEFAULT_IO[], unstableio(stderr))
stdout_f() = something(DEFAULT_IO[], unstableio(stdout))
const PREV_ENV_PATH = Ref{String}("")

can_fancyprint(io::IO) = ((io isa Base.TTY) || (io isa IOContext{IO} && io.io isa Base.TTY)) && (get(ENV, "CI", nothing) != "true")
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")
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 d801e45

Please sign in to comment.