mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
feat: add workingDirectory option to shell.openExternal() (#15065)
Allows passing `workingDirectory` to the underlying `ShellExecuteW` API on Windows. the motivation is that by default `ShellExecute` would use the current working directory, which would get locked on Windows and can prevent autoUpdater from working correctly. We need to be able specify a different `workingDirectory` to prevent this situation.
This commit is contained in:
committed by
Alexey Kuzmin
parent
2d186cb31a
commit
a9475f3590
@@ -37,9 +37,10 @@ Open the given file in the desktop's default manner.
|
||||
### `shell.openExternal(url[, options, callback])`
|
||||
|
||||
* `url` String - Max 2081 characters on windows, or the function returns false.
|
||||
* `options` Object (optional) _macOS_
|
||||
* `activate` Boolean - `true` to bring the opened application to the
|
||||
foreground. The default is `true`.
|
||||
* `options` Object (optional)
|
||||
* `activate` Boolean (optional) - `true` to bring the opened application to the
|
||||
foreground. The default is `true`. _macOS_
|
||||
* `workingDirectory` String (optional) - The working directory. _Windows_
|
||||
* `callback` Function (optional) _macOS_ - If specified will perform the open asynchronously.
|
||||
* `error` Error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user