Search for homebrew in /opt as well (fixes #496)
This commit is contained in:
@@ -334,9 +334,13 @@ public class RenderSettings {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Homebrew doesn't seem to reliably symlink its installed binaries either
|
// Homebrew doesn't seem to reliably symlink its installed binaries either
|
||||||
File homebrewFolder = new File("/usr/local/Cellar/ffmpeg");
|
// and there's multiple locations for where Homebrew is.
|
||||||
String[] homebrewVersions = homebrewFolder.list();
|
for (String path : new String[]{"/usr/local", "/opt/homebrew"}) {
|
||||||
if (homebrewVersions != null) {
|
File homebrewFolder = new File(path + "/Cellar/ffmpeg");
|
||||||
|
String[] homebrewVersions = homebrewFolder.list();
|
||||||
|
if (homebrewVersions == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Optional<File> latestOpt = Arrays.stream(homebrewVersions)
|
Optional<File> latestOpt = Arrays.stream(homebrewVersions)
|
||||||
.map(ComparableVersion::new) // Convert file name to comparable version
|
.map(ComparableVersion::new) // Convert file name to comparable version
|
||||||
.sorted(Comparator.reverseOrder()) // Sort for latest version
|
.sorted(Comparator.reverseOrder()) // Sort for latest version
|
||||||
|
|||||||
Reference in New Issue
Block a user