feat(daemon): scope describe to one workspace member; reuse executable path helper in tests
This commit is contained in:
1 parent
9f4477b8d4
commit
2b18a0331a
10 files changed
+66
-16
No files matched your search
+8
-4
@@ -1625,8 +1625,10 @@ int execute_daemon_command(std::string_view sub, const DaemonCmdOptions &opts) {
|
||||
std::cerr << "vbs daemon describe: --profile must not be empty\n";
|
||||
return 2;
|
||||
}
|
||||
request_json =
|
||||
std::format(R"({{"op":"describe","profile":{}}})", Util::json_quote(opts.profile_arg));
|
||||
request_json = std::format(
|
||||
R"({{"op":"describe","profile":{}{}}})", Util::json_quote(opts.profile_arg),
|
||||
opts.member_arg ? std::format(",\"member\":{}", Util::json_quote(*opts.member_arg))
|
||||
: std::string{});
|
||||
} else if (sub == "graph") {
|
||||
request_json = std::format(R"({{"op":"graph","profile":{},"format":{}}})",
|
||||
Util::json_quote(opts.profile_arg),
|
||||
@@ -2658,8 +2660,10 @@ int main(int argc, char **argv) {
|
||||
auto &daemon_describe_cmd =
|
||||
daemon_cmd.subcommand("describe", "Describe a project's build graph via the daemon");
|
||||
configure_daemon_common(daemon_describe_cmd);
|
||||
daemon_describe_cmd.option_default("--profile", "-p", "Profile to evaluate",
|
||||
daemon_opts.profile_arg, "debug");
|
||||
daemon_describe_cmd
|
||||
.option_default("--profile", "-p", "Profile to evaluate", daemon_opts.profile_arg,
|
||||
"debug")
|
||||
.option("--member", "", "Workspace member to describe (default: all)", daemon_opts.member_arg);
|
||||
auto &daemon_build_cmd = daemon_cmd.subcommand("build", "Build a project graph via the daemon");
|
||||
configure_daemon_common(daemon_build_cmd);
|
||||
daemon_build_cmd
|
||||
|
||||
Reference in new issue
Block a user