feat: convert shell.openItem to async shell.openPath (#20682)

This commit is contained in:
Shelley Vohr 2019-11-07 23:08:43 -08:00 committed by GitHub
parent fd70ac1173
commit d3622f9c37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 121 additions and 58 deletions

View file

@ -1056,9 +1056,12 @@ app.on('ready', () => {
// https://github.com/atom/electron/blob/master/docs/api/shell.md
shell.showItemInFolder('/home/user/Desktop/test.txt')
shell.openItem('/home/user/Desktop/test.txt')
shell.moveItemToTrash('/home/user/Desktop/test.txt')
shell.openPath('/home/user/Desktop/test.txt').then(err => {
if (err) console.log(err)
})
shell.openExternal('https://github.com', {
activate: false
}).then(() => {})