Handle missing user_hardware on non-Windows systems

This commit is contained in:
Bill Somerville 2020-07-27 13:13:04 +01:00
parent a2ad0be85b
commit bb927a6115
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F
1 changed files with 6 additions and 0 deletions

View File

@ -719,6 +719,12 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
// run the executable. CMD.EXE returns exit code 1 when it
// can't find the target executable.
if (exitCode != 1) // CMD.EXE couldn't find file to execute
#else
// We forgo detecting user_hardware failures with exit
// code 127 non-Windows. This is because we use /bin/sh to
// run the executable. /bin/sh returns exit code 127 when it
// can't find the target executable.
if (exitCode != 127) // /bin/sh couldn't find file to execute
#endif
{
subProcessFailed (&p3, exitCode, status);