Command (Windows): detects command not found error (WIP)

This commit is contained in:
李通洲
2026-10-10 11:14:07 +08:00
committed by Carter Li
parent a7e19308cc
commit 0806145f4d
4 changed files with 22 additions and 2 deletions
+6
View File
@@ -15,6 +15,12 @@ static const char* spawnProcess(FFCommandOptions* options, FFProcessHandle* hand
return "No command text specified";
}
#if _WIN32
if (ffStrbufEqualS(&options->shell, "cmd.exe") && ffStrbufEqualS(&options->param, "/d/c")) {
ffStrbufAppendS(&options->text, " & exit %^errorlevel%"); // Necessary to propagate 9009 from CMD
}
#endif
return ffProcessSpawn(options->param.length ? (char* const[]) {
options->shell.chars,
options->param.chars,