- Fixing bug that yielded empty expanded command sets.

This commit is contained in:
Ian Roddis
2021-08-20 10:58:10 -03:00
parent 1668117566
commit de8025e0f9
2 changed files with 3 additions and 5 deletions

View File

@@ -17,8 +17,9 @@ namespace daggy {
std::vector<std::vector<std::string>> commands{{}};
for (const auto &part : command) {
std::vector<std::string> expandedPart;
std::vector<std::string> expandedPart{part};
// Find all values of parameters, and expand them
for (const auto &[param, paramValue] : parameters) {
auto pos = part.find(param);
if (pos == std::string::npos) continue;