Skip to content

Commit

Permalink
added passing down arg to command in watch commnd
Browse files Browse the repository at this point in the history
  • Loading branch information
lsproule committed Nov 1, 2023
1 parent c755e08 commit f1b5857
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Command/CommandDev.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ namespace Command {
);
const std::string command = "cmake ./build/ && make && ./build/" + ctx->build_dir + "/" + ctx->project_name + " " +command_args;
#else
std::string command_args = std::accumulate(
args_vec.begin(), args_vec.end(), args_vec[0],
[](std::string a, std::string b) { return a + " " + b; }
);

const std::string command = "cmake . && make && ./" + ctx->build_dir + "/" + ctx->project_name + " " + command_args;
#endif
system(command.c_str());
Expand Down

0 comments on commit f1b5857

Please sign in to comment.