MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / parse_shell

Method parse_shell

source/MaaFramework/Resource/PipelineParser.cpp:1446–1459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1444}
1445
1446bool PipelineParser::parse_shell(const json::value& input, Action::ShellParam& output, const Action::ShellParam& default_value)
1447{
1448 if (!get_and_check_value(input, "cmd", output.cmd, default_value.cmd)) {
1449 LogError << "failed to get_and_check_value cmd" << VAR(input);
1450 return false;
1451 }
1452
1453 if (!get_and_check_value(input, "shell_timeout", output.shell_timeout, default_value.shell_timeout)) {
1454 LogError << "failed to get_and_check_value shell_timeout" << VAR(input);
1455 return false;
1456 }
1457
1458 return true;
1459}
1460
1461bool PipelineParser::parse_command_param(const json::value& input, Action::CommandParam& output, const Action::CommandParam& default_value)
1462{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected