Reproducer:
sudo systemd-run --scope --json=short /bin/echo hi
Before, systemd-run printed JSON metadata to stdout and then executed
the scope command on the same stdout. The combined stream was not valid
JSON, so reject --json= in scope mode.
Follow-up for
fe5a6c47af675bc0020c545d86fb103492e1d77c
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--no-block is not supported in --scope mode.");
+ if (arg_scope && sd_json_format_enabled(arg_json_format_flags))
+ return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
+ "--json= is not supported in --scope mode.");
+
if (arg_stdio != ARG_STDIO_NONE) {
if (with_trigger || arg_scope)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
--property=RuntimeMaxSec=infinity \
true
(! systemd-run --scope --ignore-failure false)
+(! systemd-run --scope --json=short true)
: "Transient scope (user daemon)"
# FIXME: https://github.com/systemd/systemd/issues/27883