-
Notifications
You must be signed in to change notification settings - Fork 29k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
macOS: revisit usage of -n
for open
from CLI
#132569
Comments
-n
for open
-n
for open
from CLi
-n
for open
from CLi-n
for open
from CLI
I ran a quick test by removing the vscode/src/vs/code/electron-main/app.ts Line 226 in 9525d0e
And did not get any call, so maybe this is not working as I had thought. |
@bpasero why cannot we handle this case via the singleinstance api ?
If possible I would like to not rely on platform specific event and keep it consistent for all platform via a single entry point, thoughts ? |
@deepak1556 yes sounds good, I wasn't sure whether when you use |
Yup it will, as open just ends up launching the app process, and there are certain files that are setup in the user data directory to identify an active instance associated with it https://github.com/electron/electron/blob/3b1c9dfc5400ceffb75a934cb6b8686fc5ba3fcd/chromium_src/chrome/browser/process_singleton_posix.cc#L5-L38 should clarify things :) |
Merging to #97626, since we want to eventually end up with it. |
This is a follow up to #102975. Wondering whether we could drop our usage of
-n
when running withopen
command and rather rely on theopen-file
event in Electron to get the data passed in:https://github.com/electron/electron/blob/13-x-y/docs/api/app.md#event-open-file-macos
My understanding is that this event would fire when a second instance is launched via
open
and without-n
.It probably needs an upstream fix to get access to more data. Similar to the work we are doing for request single instance lock.
The text was updated successfully, but these errors were encountered: