Open casey opened 3 years ago
@soenkehahn This seems like something we should support, but I wanted to check with before I started implementing it.
I was thinking about how to test this, and the obvious thing to do is pipe data into a binary that uses cradle to read standard input and print it to standard output. (I don't think there's a way to test this from within a unit test.) I was thinking of doing this with a test helper subcommand, since that binary already exists:
"cat using cradle" => {
run!("cat");
}
I could also do it with a separate binary, maybe called cradle_cat
. Which do you think is better?
I tried to do:
Which didn't work, because
systemctl edit foo
requires a TTY, because cradle always usescommand.stdin(Stdio::piped())
, the process doesn't inherit the TTY on standard input.There should probably be some way to tell cradle that commands should inherit standard input.