Microsoft/vscode

Overriding XDG_DATA_HOME in snap leads to multiple problems

Open

#237,608 opened on 2025年1月9日

GitHub で見る
 (18 comments) (31 reactions) (1 assignee)TypeScript (10,221 forks)batch import
bughelp wantedlinuxsnap

Repository metrics

Stars
 (74,848 stars)
PR merge metrics
 (平均マージ 11h 43m) (30d で 1,000 merged PRs)

説明

Does this issue occur when all extensions are disabled?: Yes

Version: 1.97.0-insider Commit: 9b0b13d9bfe21c3dfd227bfaa8ed5693e309a2e0 Date: 2025-01-08T05:06:32.681Z Electron: 32.2.7 ElectronBuildId: 10660205 Chromium: 128.0.6613.186 Node.js: 20.18.1 V8: 12.8.374.38-electron.0 OS: Linux x64 6.12.8-1-MANJARO snap

2d28c0a79c87 added a feature that redefines XDG_DATA_HOME to be $SNAP_USER_DATA/.local/share. This leads to several problems

  • This creates a bogus Trash that's not the system one, and as such is unmanageable (and is carried over from update to update, gradually inflating) : #233649, #237147
  • Since it also applies to commands run in the integrated terminal, all programs that use XDG dirs will only see the local snap ones instead of the system ones. E.g. :
    • Messing up fish (#232741) and Xonsh histories
    • Creates a separate brittle data dir for uv (what lead me here)
    • Creates a separate root for virtualenvwrapper, with environments created outside vscode not accessible inside and vice-versa
    • Probably many other subtle and hard to track bugs

Would it be possible to revert this, or at least have an option to make it opt-out-able?

コントリビューターガイド