Skip to content

feat(cli): UTExportedTypeDeclarations support for file associations - #12

Open
tomerqodo wants to merge 2 commits into
sentry_full_base_featcli_utexportedtypedeclarations_support_for_file_associations_pr12from
sentry_full_head_featcli_utexportedtypedeclarations_support_for_file_associations_pr12
Open

tomerqodo wants to merge 2 commits into
sentry_full_base_featcli_utexportedtypedeclarations_support_for_file_associations_pr12from
sentry_full_head_featcli_utexportedtypedeclarations_support_for_file_associations_pr12

Conversation

@tomerqodo

Copy link
Copy Markdown

Benchmark PR from agentic-review-benchmarks#12


if association.ext.is_empty() {
dict.insert(
"CFBundleTypeExtensions".into(),

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Bug: The condition if association.ext.is_empty() is inverted. It prevents file extensions from being added to the macOS bundle's Info.plist when they are present.
Severity: CRITICAL

Suggested Fix

Invert the condition to correctly add the extensions when the list is not empty. Change if association.ext.is_empty() to if !association.ext.is_empty().

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: crates/tauri-bundler/src/bundle/macos/app.rs#L330

Potential issue: The code checks `if association.ext.is_empty()` before adding
`CFBundleTypeExtensions` to the macOS application's `Info.plist`. This logic is
inverted. When `association.ext` contains extensions, the `if` block is skipped, and the
extensions are never registered. When `association.ext` is empty, an empty array is
added. This will cause file associations to fail on macOS for applications that define
them, as the operating system will not be aware of the file types the application can
handle.

Did we get this right? 👍 / 👎 to inform future reviews.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant