fix(deep-link): check update-desktop-database existence before executing#3383
Open
mvanhorn wants to merge 1 commit intotauri-apps:v2from
Open
fix(deep-link): check update-desktop-database existence before executing#3383mvanhorn wants to merge 1 commit intotauri-apps:v2from
mvanhorn wants to merge 1 commit intotauri-apps:v2from
Conversation
On Linux, `update-desktop-database` (from `desktop-file-utils`) may not be installed, especially on KDE systems. Instead of failing with an IO error, log a warning when the command is not found and continue. Non-NotFound errors still propagate as before. Fixes tauri-apps#2265
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
On Linux,
update-desktop-databasefromdesktop-file-utilsmay not be installed. KDE systems don't require it. The current code calls it unconditionally and fails with an IO error when the command is missing.This changes the call to handle
ErrorKind::NotFoundgracefully - logs a warning and continues instead of failing. Non-NotFound errors still propagate.Changes
plugins/deep-link/src/lib.rs: Wrap theupdate-desktop-databaseinvocation in a match that handlesNotFoundwith a warning instead of returning an error.Testing
cargo check -p tauri-plugin-deep-linkpassesFixes #2265
This contribution was developed with AI assistance (Claude Code).