docs: Add note about argv getting modified (#36735)

Add note about argv getting modified

See https://github.com/electron/electron/issues/20322
This commit is contained in:
Mikael Finstad 2023-01-05 18:39:45 +08:00 committed by GitHub
parent 9b8b8f5880
commit ba962c94cc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -498,6 +498,10 @@ and `workingDirectory` is its current working directory. Usually
applications respond to this by making their primary window focused and
non-minimized.
**Note:** `argv` will not be exactly the same list of arguments as those passed
to the second instance. The order might change and additional arguments might be appended.
If you need to maintain the exact same arguments, it's advised to use `additionalData` instead.
**Note:** If the second instance is started by a different user than the first, the `argv` array will not include the arguments.
This event is guaranteed to be emitted after the `ready` event of `app`