Skip to content

Commit a202888

Browse files
Handle all platforms properly
On macOS an application can be the app bundle (which is a directory) or the executable withing that bundle. On all other platforms it can only be the executable, which is a file.
1 parent 61d5a8d commit a202888

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,9 @@ ipcMain.handle(
590590
'select-application',
591591
() =>
592592
dialog.showOpenDialogSync({
593-
properties: ['openFile', 'treatPackageAsDirectory'],
593+
properties:
594+
process.platform === 'darwin'
595+
? ['openFile', 'openDirectory', 'treatPackageAsDirectory']
596+
: ['openFile'],
594597
})?.[0]
595598
);

0 commit comments

Comments
 (0)