codebytere

#49476: fix: second argument to shell.writeShortcutLink is optional

Merged
Created: Jan 21, 2026, 10:20:58 AM
Merged: Jan 23, 2026, 10:24:48 AM
4 comments
Target: main

Description of Change

Closes #49469

Fixes an issue where shell.writeShortcutLink was throwing TypeError: Insufficient number of arguments when called with just [(path, options)] and no operation argument, even though the docs say operation should default to "create". Fix the argument parsing to check if the second argument is an object (options) or a string (operation), allowing the operation to be optional as expected.

Checklist

Release Notes

Notes: Fixed an issue where shell.writeShortcutLink was throwing TypeError: Insufficient number of arguments when called with just [(path, options)].

Backports

39-x-y
Merged
PR Number
#49502
Merged At
Jan 23, 2026, 1:31:10 PM
Released In
Not yet
Release Date
Not yet
40-x-y
In-flight
PR Number
#49501
Waiting to be merged
41-x-y
In-flight
PR Number
#49503
Waiting to be merged

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron