Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove stale handler for extend-info #8661

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

t3chguy
Copy link
Contributor

@t3chguy t3chguy commented Nov 4, 2024

The extend-info read was removed in a23e680 so this if statement never runs

Copy link

changeset-bot bot commented Nov 4, 2024

🦋 Changeset detected

Latest commit: f665dd6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
app-builder-lib Patch
dmg-builder Patch
electron-builder-squirrel-windows Patch
electron-builder Patch
electron-forge-maker-appimage Patch
electron-forge-maker-nsis-web Patch
electron-forge-maker-nsis Patch
electron-forge-maker-snap Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@t3chguy t3chguy changed the title Remove stale handler for extend-info refactor: remove stale handler for extend-info Nov 4, 2024
@t3chguy t3chguy marked this pull request as ready for review November 4, 2024 17:18
@mmaietta
Copy link
Collaborator

mmaietta commented Nov 5, 2024

Great catch. How did you determine that it was stale?
decode-plist is an undocumented function in https://github.com/develar/app-builder but AFAICT, it shouldn't be returning any entry at that array index either
https://github.com/develar/app-builder/blob/d971224691f6f48555e2a9bb327f99627893372c/pkg/plist/plist.go#L68-L70

@t3chguy
Copy link
Contributor Author

t3chguy commented Nov 5, 2024

Great catch. How did you determine that it was stale?

I was looking at ways to work around #8660 by injecting my own data into the asar without it being nuked by the asar integrity calculation and thought extend-info was my golden ticket. Sadly not.

Prior to the linked commit extend-info was a value on buildMetadata ((buildMetadata as any)["extend-info"]) but there is no longer such a key anywhere else in the codebase and indeed the undocumented function returns the same amount as you put in.

@mmaietta
Copy link
Collaborator

mmaietta commented Nov 5, 2024

Are you referring to this extendInfo functionality?

mac: {
  extendInfo: {
    LSUIElement: true,
    CFBundleDocumentTypes: [
      {
        CFBundleTypeName: "Folders",
        CFBundleTypeRole: "Editor",
        LSItemContentTypes: ["public.folder"],
      },
    ],
  },
}

@t3chguy
Copy link
Contributor Author

t3chguy commented Nov 5, 2024

Yes, sadly the ASAR integrity thing just overwrites the field rather than merging into it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants