Skip to content

fix(integrations): preserve non-UTF-8 VS Code settings - #3833

Open
marcelsafin wants to merge 1 commit into
github:mainfrom
marcelsafin:fix/copilot-settings-encoding
Open

fix(integrations): preserve non-UTF-8 VS Code settings#3833
marcelsafin wants to merge 1 commit into
github:mainfrom
marcelsafin:fix/copilot-settings-encoding

Conversation

@marcelsafin

Copy link
Copy Markdown
Contributor

Fixes #3831

A non-UTF-8 .vscode/settings.json escapes the existing parse-failure fallback and aborts setup. This handles decode errors through the same preservation path used for malformed JSON, leaving the file unchanged and showing the manual settings guidance.

The regression test covers setup with non-UTF-8 settings.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings July 29, 2026 00:59
@marcelsafin
marcelsafin requested a review from mnriem as a code owner July 29, 2026 00:59
@marcelsafin

Copy link
Copy Markdown
Contributor Author

@copilot review

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Fixes Copilot setup crashes caused by non-UTF-8 VS Code settings while preserving user files.

Changes:

  • Handles UnicodeDecodeError through the existing preservation fallback.
  • Adds regression coverage for non-UTF-8 settings.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/specify_cli/integrations/copilot/__init__.py Catches UTF-8 decoding failures during settings merge.
tests/integrations/test_integration_copilot.py Verifies preservation and warning behavior.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

[Bug]: Copilot setup crashes on a non-UTF-8 VS Code settings file

2 participants