@@ -966,7 +966,7 @@ pub const ChildProcess = struct {
966
966
defer self .allocator .free (cmd_line_w );
967
967
968
968
windowsCreateProcess (app_path_w .ptr , cmd_line_w .ptr , envp_ptr , cwd_w_ptr , & siStartInfo , & piProcInfo ) catch | no_path_err | {
969
- if (no_path_err != error .FileNotFound ) return no_path_err ;
969
+ if (no_path_err != error .FileNotFound and no_path_err != error . InvalidExe ) return no_path_err ;
970
970
971
971
const PATH : [:0 ]const u16 = std .os .getenvW (unicode .utf8ToUtf16LeStringLiteral ("PATH" )) orelse &[_ :0 ]u16 {};
972
972
const PATHEXT : [:0 ]const u16 = std .os .getenvW (unicode .utf8ToUtf16LeStringLiteral ("PATHEXT" )) orelse &[_ :0 ]u16 {};
@@ -991,7 +991,7 @@ pub const ChildProcess = struct {
991
991
if (windowsCreateProcess (path_no_ext .ptr , cmd_line_w .ptr , envp_ptr , cwd_w_ptr , & siStartInfo , & piProcInfo )) | _ | {
992
992
break :retry ;
993
993
} else | err | switch (err ) {
994
- error .FileNotFound , error .AccessDenied = > {},
994
+ error .FileNotFound , error .AccessDenied , error . InvalidExe = > {},
995
995
else = > return err ,
996
996
}
997
997
@@ -1007,6 +1007,7 @@ pub const ChildProcess = struct {
1007
1007
} else | err | switch (err ) {
1008
1008
error .FileNotFound = > continue ,
1009
1009
error .AccessDenied = > continue ,
1010
+ error .InvalidExe = > continue ,
1010
1011
else = > return err ,
1011
1012
}
1012
1013
}
0 commit comments