mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-11-25 00:50:31 +00:00
More mac fixes
This commit is contained in:
parent
fd05f9bb0f
commit
0ee12c8e5a
1 changed files with 5 additions and 1 deletions
|
@ -38,7 +38,11 @@ public abstract class ExternalApplicationType implements PrefsChoiceValue {
|
|||
|
||||
protected Optional<Path> getApplicationPath() {
|
||||
try (ShellProcessControl pc = ShellStore.local().create().start()) {
|
||||
try (var c = pc.command(String.format("osascript -e 'POSIX path of (path to application \"%s\")'", applicationName)).start()) {
|
||||
try (var c = pc.command(String.format(
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister " +
|
||||
"-dump | grep -o \"/.*%s.app\" | grep -v -E \"Caches|TimeMachine|Temporary|/Volumes/%s\" | uniq)'",
|
||||
applicationName, applicationName))
|
||||
.start()) {
|
||||
var path = c.readOnlyStdout();
|
||||
if (c.getExitCode() != 0) {
|
||||
return Optional.empty();
|
||||
|
|
Loading…
Reference in a new issue