Skip to content

fix: post-install script doesn't check for existing sources#311795

Merged
rzhao271 merged 5 commits intomainfrom
rzhao271/pretty-pony
Apr 24, 2026
Merged

fix: post-install script doesn't check for existing sources#311795
rzhao271 merged 5 commits intomainfrom
rzhao271/pretty-pony

Conversation

@rzhao271
Copy link
Copy Markdown
Collaborator

@rzhao271 rzhao271 commented Apr 21, 2026

Co-authored-by: Copilot copilot@github.com

Fixes #311713

Co-authored-by: Copilot <copilot@github.com>
Copilot AI review requested due to automatic review settings April 21, 2026 22:13
@rzhao271 rzhao271 self-assigned this Apr 21, 2026
@rzhao271 rzhao271 added this to the 1.118.0 milestone Apr 21, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the Debian/Ubuntu post-install script to avoid enrolling the Microsoft VS Code APT repository when an equivalent repo source is already present, addressing duplicate repo entries that can break apt operations.

Changes:

  • Add has_existing_repo_source() to detect existing .list or .sources entries pointing at https://packages.microsoft.com/repos/code.
  • Skip writing vscode.list / vscode.sources when an existing repo enrollment is detected.

Comment thread resources/linux/debian/postinst.template Outdated
Comment thread resources/linux/debian/postinst.template
Comment thread resources/linux/debian/postinst.template Outdated
Comment thread resources/linux/debian/postinst.template Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 21, 2026

No screenshot changes.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@rzhao271
Copy link
Copy Markdown
Collaborator Author

@copilot Ensure that the has existing check doesn't scan for the predefined files.

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 24, 2026

@copilot Ensure that the has existing check doesn't scan for the predefined files.

Fixed in 350b462. Moved the CODE_SOURCE_PART / CODE_SOURCE_PART_DEB822 file checks above the has_existing_repo_source branch. Now has_existing_repo_source is only reached when neither of our managed files exists, so it will never scan them.

@rzhao271 rzhao271 marked this pull request as ready for review April 24, 2026 21:05
@rzhao271 rzhao271 enabled auto-merge (squash) April 24, 2026 21:05
@rzhao271 rzhao271 merged commit fda5c96 into main Apr 24, 2026
34 checks passed
@rzhao271 rzhao271 deleted the rzhao271/pretty-pony branch April 24, 2026 21:17
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.

VS Code Debian package can create duplicate repo enrollment during install.

4 participants