diff --git a/man/systemd-run.xml b/man/systemd-run.xml index 386702ac40..9afe4ab446 100644 --- a/man/systemd-run.xml +++ b/man/systemd-run.xml @@ -575,7 +575,7 @@ By default, if the specified command fails the invoked unit will be marked failed (though possibly still unloaded, see , above), and this is reported in the logs. If this switch is specified this is suppressed and any non-success exit status/code of the - command is treated as success. + command is treated as success. This option is not supported in mode. diff --git a/src/run/run.c b/src/run/run.c index ac6d3c0196..69449ab2ff 100644 --- a/src/run/run.c +++ b/src/run/run.c @@ -697,9 +697,9 @@ static int parse_argv(int argc, char *argv[]) { return log_error_errno(SYNTHETIC_ERRNO(EINVAL), "Scope execution is not supported on remote systems."); - if (arg_scope && (arg_remain_after_exit || arg_service_type)) + if (arg_scope && (arg_remain_after_exit || arg_service_type || arg_ignore_failure)) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), - "--remain-after-exit and --service-type= are not supported in --scope mode."); + "--remain-after-exit, --service-type= and --ignore-failure are not supported in --scope mode."); if (arg_scope && arg_no_block) return log_error_errno(SYNTHETIC_ERRNO(EINVAL), diff --git a/test/units/TEST-74-AUX-UTILS.run.sh b/test/units/TEST-74-AUX-UTILS.run.sh index ec73a0bd1c..9db1a81018 100755 --- a/test/units/TEST-74-AUX-UTILS.run.sh +++ b/test/units/TEST-74-AUX-UTILS.run.sh @@ -115,6 +115,7 @@ systemd-run --scope \ --property=RuntimeMaxSec=10 \ --property=RuntimeMaxSec=infinity \ true +(! systemd-run --scope --ignore-failure false) : "Transient scope (user daemon)" # FIXME: https://github.com/systemd/systemd/issues/27883