Skip to content

feat: add Linux support for app.getApplicationInfoForProtocol() - #51297

Merged
ckerr merged 4 commits into
mainfrom
feat/support-app.getApplicationInfoForProtocol-on-linux
May 1, 2026
Merged

ckerr merged 4 commits into
mainfrom
feat/support-app.getApplicationInfoForProtocol-on-linux

Conversation

@ckerr

@ckerr ckerr commented Apr 23, 2026 •

Copy link
Copy Markdown
Member

Description of Change

  • Implement app.getApplicationInfoForProtocol() on Linux.
  • Mark it as supported in the docs
  • Add tests
  • Move XDG test helpers into spec/lib/xdg-helpers.ts

Related: #51253, #51197

Checklist

Release Notes

Notes: Added Linux support for app.getApplicationInfoForProtocol().

@ckerr ckerr added semver/minor backwards-compatible functionality target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 23, 2026
@ckerr ckerr changed the title feat: support app.getApplicationInfoForProtocol() on Linux feat: add Linux support for app.getApplicationInfoForProtocol() Apr 23, 2026
@ckerr

ckerr commented Apr 23, 2026 •

Copy link
Copy Markdown
Member Author

This is a semver/minor feature but I don't think it requires API review -- it adds Linux support for an existing API. The API itself is unchanged 👍

I'm not sure what the protocol is for the API WG, so I'm not sure if I should remove the api-review/requested label myself? CC'ing @electron/wg-api for guidance

@ckerr
ckerr force-pushed the feat/support-app.getApplicationInfoForProtocol-on-linux branch 3 times, most recently from 6822bd7 to cea2894 Compare April 24, 2026 13:51
@ckerr

ckerr commented Apr 24, 2026 •

Copy link
Copy Markdown
Member Author

(force-pushed after git rebase main to pick up CI fixes)

@erickzhao erickzhao left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

Yippee 🎉

@ckerr ckerr left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

@codebytere codebytere left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

API LGTM

@ckerr
ckerr force-pushed the feat/support-app.getApplicationInfoForProtocol-on-linux branch from cea2894 to 4cb44a2 Compare April 28, 2026 20:49
Comment thread spec/api-app-spec.ts Outdated
Comment on lines +1699 to +1703
process.env.PATH = [xdgBinDir, oldEnv.PATH].filter(Boolean).join(':');
process.env.XDG_DATA_HOME = xdgDataHome;
process.env.XDG_DATA_DIRS = getXdgDataDirsWithFallback(xdgDataHome, oldEnv.XDG_DATA_DIRS);
process.env.XDG_CONFIG_HOME = xdgConfigHome;
app.setDesktopName(desktopFileId);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jkleinsc jkleinsc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requesting changes since there is a build failure

@ckerr

ckerr commented Apr 30, 2026

Copy link
Copy Markdown
Member Author

Oops, looks like I broke it while rebasing :(

@ckerr
ckerr force-pushed the feat/support-app.getApplicationInfoForProtocol-on-linux branch from 4cb44a2 to d4edc9d Compare April 30, 2026 15:19
@ckerr
ckerr requested a review from jkleinsc April 30, 2026 20:06
@ckerr
ckerr merged commit 24ac4a4 into main May 1, 2026
73 checks passed
@ckerr
ckerr deleted the feat/support-app.getApplicationInfoForProtocol-on-linux branch May 1, 2026 19:19
@release-clerk

release-clerk Bot commented May 1, 2026

Copy link
Copy Markdown

Release Notes Persisted

Added Linux support for app.getApplicationInfoForProtocol().

@trop

trop Bot commented May 1, 2026

Copy link
Copy Markdown
Contributor

I was unable to backport this PR to "42-x-y" cleanly;
you will need to perform this backport manually.

@trop trop Bot added needs-manual-bp/42-x-y and removed target/42-x-y PR should also be added to the "42-x-y" branch. labels May 1, 2026
@trop

trop Bot commented May 18, 2026

Copy link
Copy Markdown
Contributor

@ckerr has manually backported this PR to "42-x-y", please check out #51680

ckerr added a commit that referenced this pull request May 18, 2026
…1297)

* feat: implement app.getApplicationInfoForProtocol() on Linux

* refactor: move xdg spec helpers to spec/lib/xdg-helpers.ts

test: add Linux test coverage for app.getApplicationInfoForProtocol()

* chore: make gncheck happy

* fixup! refactor: move xdg spec helpers to spec/lib/xdg-helpers.ts

fix accidental clobber of XDG_DATA_DIRS
jkleinsc pushed a commit that referenced this pull request May 20, 2026
#51680)

feat: add Linux support for `app.getApplicationInfoForProtocol()` (#51297)

* feat: implement app.getApplicationInfoForProtocol() on Linux

* refactor: move xdg spec helpers to spec/lib/xdg-helpers.ts

test: add Linux test coverage for app.getApplicationInfoForProtocol()

* chore: make gncheck happy

* fixup! refactor: move xdg spec helpers to spec/lib/xdg-helpers.ts

fix accidental clobber of XDG_DATA_DIRS
@trop trop Bot added merged/42-x-y PR was merged to the "42-x-y" branch. and removed in-flight/42-x-y labels May 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-review/approved ✅ merged/42-x-y PR was merged to the "42-x-y" branch. semver/minor backwards-compatible functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants