From 27bed948d4ddfffbb6ea5ad80a2a58394fa96b75 Mon Sep 17 00:00:00 2001 From: yuchenlin Date: Sat, 8 Sep 2018 09:16:53 +0800 Subject: [PATCH] Use specific error for missing binary on Windows Signed-off-by: yuchenlin Signed-off-by: Romain Vimont --- app/src/sys/win/command.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/sys/win/command.c b/app/src/sys/win/command.c index 7a29442d..1a14d89a 100644 --- a/app/src/sys/win/command.c +++ b/app/src/sys/win/command.c @@ -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; }