Browse Source

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

Add note about argv getting modified

See https://github.com/electron/electron/issues/20322

Co-authored-by: Mikael Finstad <[email protected]>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Mikael Finstad <[email protected]>
trop[bot] 2 years ago
parent
commit
4076f06036
1 changed files with 4 additions and 0 deletions
  1. 4 0
      docs/api/app.md

+ 4 - 0
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`