mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-23 01:44:22 +00:00
Linux: Use return code of which to determine whether executable is available instead of parsing output
This commit is contained in:
parent
a3af3a5381
commit
c73d215cc0
1 changed files with 1 additions and 4 deletions
|
|
@ -32,16 +32,13 @@ static bool exeIsAvailable (String executable)
|
|||
|
||||
if (child.start ("which " + executable))
|
||||
{
|
||||
auto output = child.readAllProcessOutput().trim();
|
||||
child.waitForProcessToFinish (60 * 1000);
|
||||
|
||||
return output.isNotEmpty() && ! output.contains ("no " + executable);
|
||||
return (child.getExitCode() == 0);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
class FileChooser::Native : public FileChooser::Pimpl,
|
||||
private Timer
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue