From 6e67c515508ef81b3411903ddff6dbd6473d4198 Mon Sep 17 00:00:00 2001 From: Dilum Aluthge Date: Thu, 31 Oct 2024 17:54:02 -0400 Subject: [PATCH] Add an environment variable to override `print_env` in `show(io::IO, cmd::Cmd)` --- base/cmd.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/base/cmd.jl b/base/cmd.jl index 84ec52f865e98..f48b10718b4c4 100644 --- a/base/cmd.jl +++ b/base/cmd.jl @@ -123,7 +123,7 @@ escape_microsoft_c_args(io::IO, cmd::Cmd) = escape_microsoft_c_args(io::IO, cmd.exec...) function show(io::IO, cmd::Cmd) - print_env = cmd.env !== nothing + print_env = (cmd.env !== nothing) && Base.parse_bool_env("JULIA_PRINT_CMD_ENVIRONMENT", "true") print_dir = !isempty(cmd.dir) (print_env || print_dir) && print(io, "setenv(") print_cpus = cmd.cpus !== nothing