From ba962c94cc20a08560c2143d3f5295c5fe22a2e8 Mon Sep 17 00:00:00 2001 From: Mikael Finstad Date: Thu, 5 Jan 2023 18:39:45 +0800 Subject: [PATCH] docs: Add note about argv getting modified (#36735) Add note about argv getting modified See https://github.com/electron/electron/issues/20322 --- docs/api/app.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/api/app.md b/docs/api/app.md index 4ccd7fde8675..41ad057faa8a 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -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`