Use specific error for missing binary on Windows
Signed-off-by: yuchenlin <npes87184@gmail.com> Signed-off-by: Romain Vimont <rom@rom1v.com>
This commit is contained in:
parent
66def38b73
commit
27bed948d4
1 changed files with 3 additions and 0 deletions
|
@ -29,6 +29,9 @@ enum process_result cmd_execute(const char *path, const char *const argv[], HAND
|
|||
#endif
|
||||
if (!CreateProcess(NULL, cmd, NULL, NULL, FALSE, flags, NULL, NULL, &si, &pi)) {
|
||||
*handle = NULL;
|
||||
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
|
||||
return PROCESS_ERROR_MISSING_BINARY;
|
||||
}
|
||||
return PROCESS_ERROR_GENERIC;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue