Skip to content

Conversation

@KristofferC
Copy link
Member

julia> io = IOBuffer();

julia> run(pipeline(`echo hello`; stdout=io))
Process(`echo hello`, ProcessExited(0))

julia> String(take!(io))
"hello\n"

@giordano
Copy link
Member

pipeline can now accept an IOBuffer

"now" being "since Julia 1.1" apparently 😄

@giordano
Copy link
Member

With this PR:

julia> io = IOBuffer(); run_interactive(preferred_runner()(mktempdir(); platform=Platform("x86_64", "linux"; libc="musl")), `/bin/bash -c "echo \$PATH"`, stdout=io); String(take!(io))
/opt/bin/x86_64-linux-musl-libgfortran3-cxx03:/opt/x86_64-linux-musl/bin:/opt/bin/x86_64-linux-musl-cxx11:/opt/x86_64-linux-musl/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/workspace/x86_64-linux-musl-cxx11/destdir/bin:/workspace/destdir/bin
""

If I revert it:

julia> io = IOBuffer(); run_interactive(preferred_runner()(mktempdir(); platform=Platform("x86_64", "linux"; libc="musl")), `/bin/bash -c "echo \$PATH"`, stdout=io); String(take!(io))
"/opt/bin/x86_64-linux-musl-libgfortran3-cxx03:/opt/x86_64-linux-musl/bin:/opt/bin/x86_64-linux-musl-cxx11:/opt/x86_64-linux-musl/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/workspace/x86_64-linux-musl-cxx11/destdir/bin:/workspace/destdir/bin\n"

I guess this wasn't covered by tests

@KristofferC
Copy link
Member Author

KristofferC commented Dec 30, 2021

Yeah... I was sure I tested it locally but I must have messed something up... I'm looking at it now. Feel free to revert in the meantime if it is causing trouble (it probably will...).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants