Skip to content

Commit f6258f5

Browse files
KristofferCgiordano
authored andcommitted
fix output from runners to IOBuffer
1 parent 769d8e2 commit f6258f5

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

src/Runner.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ abstract type Runner; end
33

44
export default_host_platform
55

6+
const AnyRedirectable = Union{Base.AbstractCmd, Base.TTY, IOStream, IOBuffer}
7+
68
# Host platform _must_ match the C++ string ABI of the binaries we get from the
79
# repositories. Note: when preferred_gcc_version=v"4" we can't really build for
810
# that C++ string ABI :-(

src/UserNSRunner.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ function Base.read(ur::UserNSRunner, cmd; verbose=false)
182182
return collect_stdout(oc)
183183
end
184184

185-
const AnyRedirectable = Union{Base.AbstractCmd, Base.TTY, IOStream}
186185
function run_interactive(ur::UserNSRunner, user_cmd::Cmd; stdin = nothing, stdout = nothing, stderr = nothing, verbose::Bool = false)
187186
warn_priviledged()
188187

test/runners.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,3 +322,10 @@ end
322322
end
323323
end
324324
end
325+
326+
@testset "outptut runner" begin
327+
io = IOBuffer()
328+
run_interactive(BinaryBuilderBase.preferred_runner()(mktempdir(); platform=Platform("x86_64", "linux"; libc="musl")), `/bin/bash -c "echo \$PATH"`, stdout=io)
329+
s = String(take!(io))
330+
@test !isempty(s)
331+
end

0 commit comments

Comments
 (0)