Skip to content

Commit

Permalink
Let julia_cmd pickup --color flag
Browse files Browse the repository at this point in the history
  • Loading branch information
tkf committed Apr 22, 2022
1 parent 3726a5e commit 03e0cb8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/cli.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ if !Sys.iswindows()
cmd = Base.julia_cmd()
cmd.exec[1] = julia # swap out the executable
filter!(x -> !startswith(x, "-J"), cmd.exec) # filter out incompatible sysimg
push!(cmd.exec, "--color=$(Base.have_color ? "yes" : "no")")
pipe = pipeline(`$(cmd) $(f) $(ARGS)`; stdout=stdout, stderr=stderr)
try
exit(!success(pipe))
Expand Down
3 changes: 3 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ mktempdir() do tmpdir; mktempdir() do depot
@test success(pipeline(`$(test_cmd) --julia=$(this_julia) --julia=$(julia11) --version`, stdout=stdout, stderr=stderr))
@test occursin(", julia version 1.1.1", read(stdout, String))
@test isempty(read(stderr, String))
@test success(pipeline(`$(test_cmd) --color=auto --julia=$(julia11) --version`, stdout=stdout, stderr=stderr))
@test occursin(", julia version 1.1.1", read(stdout, String))
@test isempty(read(stderr, String))
end
end
# Smoke test all Pkg commands in interpreted mode
Expand Down

0 comments on commit 03e0cb8

Please sign in to comment.