Skip to content

Commit

Permalink
[chip-tool] Log decoded json command (#24640)
Browse files Browse the repository at this point in the history
  • Loading branch information
vivien-apple authored and pull[bot] committed Aug 29, 2023
1 parent 8d9df93 commit 2910177
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions examples/chip-tool/commands/common/Commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,16 @@ int Commands::RunInteractive(const char * command)
char * argv[kInteractiveModeArgumentsMaxLength] = {};
argv[argc++] = kInteractiveModeName;

std::string commandStr;
for (auto & arg : arguments)
{
argv[argc] = new char[arg.size() + 1];
strcpy(argv[argc++], arg.c_str());
commandStr += arg;
commandStr += " ";
}

ChipLogProgress(chipTool, "Command: %s", commandStr.c_str());
auto err = RunCommand(argc, argv, true);

// Do not delete arg[0]
Expand Down

0 comments on commit 2910177

Please sign in to comment.