Conversation
The application repository TOML uses the key `snap_dir`, but the `AppConfig` struct field is named `snap_id` and has no serde rename. Since the struct is `#[serde(default)]` and did not deny unknown fields, the key was silently dropped and `snap_id` was always `None`. As a result the snap config dir resolved to `~/snap/common/.mozilla/firefox` instead of `~/snap/firefox/common/.mozilla/firefox`, so snap-installed browsers were skipped with "profiles.ini does not exist". Add `#[serde(rename = "snap_dir")]`, turn on `deny_unknown_fields` so a future typo fails loudly, and add a regression test. Affects all 8 entries with `snap_dir`: Firefox x3, Chromium x3, Brave, Slack. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.
The application repository TOML uses the key
snap_dir, but theAppConfigstruct field is namedsnap_idand has no serde rename. Since the struct is#[serde(default)]and did not deny unknown fields, the key was silently dropped andsnap_idwas alwaysNone.As a result the snap config dir resolved to
~/snap/common/.mozilla/firefoxinstead of^^^~/snap/firefox/common/.mozilla/firefox, so snap-installed browsers were skipped with "profiles.ini does not exist".^^^^^^^^^^^Add
#[serde(rename = "snap_dir")], turn ondeny_unknown_fieldsso a future typo fails loudly, and add a regression test.Affects all 8 entries with
snap_dir: Firefox x3, Chromium x3, Brave, Slack.