tmp_file_path = tmp_file.path;
LOG("Arguments from {}", tmp_file.path);
}
- BOOL ret = CreateProcess(full_path.c_str(),
+ BOOL ret = CreateProcess(nullptr,
const_cast<char*>(args.c_str()),
nullptr,
nullptr,
add_exe_suffix(const std::string& program)
{
std::string ext = util::to_lowercase(fs::path(program).extension().string());
- if (ext == ".exe" || ext == ".bat" || ext == ".sh") {
+ if (ext == ".exe" || ext == ".bat" || ext == ".cmd" || ext == ".sh") {
return program;
} else {
return program + ".exe";
// --- Interface ---
-// Add ".exe" suffix to `program` if it doesn't already end with ".exe", ".bat"
-// or ".sh".
+// Add ".exe" suffix to `program` if it doesn't already end with ".exe", ".bat",
+// ".cmd" or ".sh".
std::string add_exe_suffix(const std::string& program);
// Return a new path with `extension` added to `path` (keeping any existing