Hi, I am trying to run an external command from Julia using the
run() function, but I am stuck on how to handle error codes and exit codes of any particular command. Previous Julia version had a
readall() function, which isn’t available anymore.
stdout,stderr = run(`some command`)
Although I do get the
error printed on the console.(May be the default behaviour causes it to dump everything to
run is not very flexible.
The following seems to work on v0.6.2 and a recent nightly:
cmd = `some command`
err = Pipe()
out = Pipe()
proc = spawn(pipeline(ignorestatus(cmd),stdout=out,stderr=err))
I don’t know if this is recommended usage, but it is based on what I learned from the test suite.
@Ralph_Smith This was really helpful and helped me get running with the code. Thanks a lot!