run: refuse --root-directory= in --scope mode

As discussed in #39669, let's reject this for now.
This commit is contained in:
Mike Yuan
2025-11-13 21:09:52 +01:00
parent b0e7c6141f
commit 045b8d761e

View File

@@ -866,6 +866,10 @@ static int parse_argv(int argc, char *argv[]) {
"--wait may not be combined with --scope.");
}
if (arg_scope && arg_root_directory)
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--root-directory= is not supported in --scope mode.");
if (same_dir && arg_root_directory && !path_equal(arg_root_directory, "/"))
return log_error_errno(SYNTHETIC_ERRNO(EINVAL),
"--same-dir cannot be used with a root directory other than '/'");