run: reject JSON output with stdio forwarding
Reproducer:
sudo systemd-run --wait --pipe --json=short /bin/echo hi
Before, systemd-run wrote its JSON metadata to stdout and then passed
the command stdout through the same stream. The combined output was not
valid machine-readable JSON, so reject the conflicting modes.
Follow-up for fe5a6c47af
This commit is contained in:
@@ -256,6 +256,7 @@ systemd-run --wait --pty true
|
||||
systemd-run --wait --machine=.host --pty true
|
||||
systemd-run --json=short true | jq . >/dev/null
|
||||
systemd-run --json=pretty true | jq . >/dev/null
|
||||
(! systemd-run --wait --pipe --json=short true)
|
||||
(! SHELL=/bin/false systemd-run --quiet --shell)
|
||||
|
||||
(! systemd-run)
|
||||
|
||||
Reference in New Issue
Block a user