diff --git a/wrapper/main.cpp b/wrapper/main.cpp index 405fae7..a8a252e 100644 --- a/wrapper/main.cpp +++ b/wrapper/main.cpp @@ -289,7 +289,14 @@ bool parse(int argc, char **argv, Target &target) { char *arg = argv[i]; if (*arg != '-') { - target.args.push_back(arg); + // Check if the argument has spaces, we need to add back the quotes if + // that's the case + std::string argument = arg; + if (argument.find_first_of("\t\n ") != std::string::npos) { + argument = "\"" + argument + "\""; + } + + target.args.push_back(argument); continue; }