Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cpp-subprocess/subprocess.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1541,11 +1541,16 @@ inline void Popen::execute_process() noexcept(false)
std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>> converter;
std::wstring argument;
std::wstring command_line;
bool first_arg = true;

for (auto arg : this->vargs_) {
if (!first_arg) {
command_line += L" ";
} else {
first_arg = false;
}
argument = converter.from_bytes(arg);
util::quote_argument(argument, command_line, false);
command_line += L" ";
}

// CreateProcessW can modify szCmdLine so we allocate needed memory
Expand Down