fix: normalize icon names to lowercase in darwinBundleDocumentTypes for case-sensitive filesystems#307865
Open
Diode11-Alt wants to merge 1 commit intomicrosoft:mainfrom
Open
Conversation
…or case-sensitive filesystems The `darwinBundleDocumentTypes` (plural) function was not calling `.toLowerCase()` on the icon parameter when constructing the `iconFile` path, unlike the singular `darwinBundleDocumentType` function which correctly lowercases the icon name. This inconsistency causes builds to fail on case-sensitive filesystems (e.g., macOS APFS with case sensitivity enabled) because the icon filenames in `resources/darwin/` are all lowercase. Fixes microsoft#129665
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #129665
The
darwinBundleDocumentTypes(plural) function was not calling.toLowerCase()on theiconparameter when constructing theiconFilepath. This is inconsistent with the singulardarwinBundleDocumentTypefunction which correctly lowercases the icon name.Root Cause
In
build/lib/electron.ts, two helper functions construct icon file paths:darwinBundleDocumentType(singular) — correctly usesicon.toLowerCase():darwinBundleDocumentTypes(plural) — was NOT lowercasing:Since all icon files in
resources/darwin/are lowercase (e.g.,bower.icns,html.icns), this inconsistency causes builds to fail on case-sensitive filesystems (e.g., macOS APFS with case sensitivity enabled).Fix
Added
.toLowerCase()to the icon path construction indarwinBundleDocumentTypesto match the behavior ofdarwinBundleDocumentType:Testing
'c','config','html','default'), so this change is functionally a no-op for current usage