mirror of
https://github.com/xpipe-io/xpipe.git
synced 2024-10-02 18:17:27 +13:00
Improve application error message on macOS
This commit is contained in:
parent
e4a157fd82
commit
3448cf95f7
1 changed files with 6 additions and 2 deletions
|
@ -79,13 +79,17 @@ public interface ExternalEditorType extends PrefsChoiceValue {
|
|||
|
||||
@Override
|
||||
public void launch(Path file) throws Exception {
|
||||
var execFile = getApplicationPath();
|
||||
if (execFile.isEmpty()) {
|
||||
throw new IOException("Application " + applicationName + ".app not found");
|
||||
}
|
||||
|
||||
ApplicationHelper.executeLocalApplication(
|
||||
shellControl -> String.format(
|
||||
"open -a %s %s",
|
||||
shellControl
|
||||
.getShellDialect()
|
||||
.fileArgument(
|
||||
getApplicationPath().orElseThrow().toString()),
|
||||
.fileArgument(execFile.orElseThrow().toString()),
|
||||
shellControl.getShellDialect().fileArgument(file.toString())),
|
||||
false);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue