Microsoft/vscode

Overriding XDG_DATA_HOME in snap leads to multiple problems

Open

#237.608 geöffnet am 9. Jan. 2025

Auf GitHub ansehen
 (18 Kommentare) (31 Reaktionen) (1 zugewiesene Person)TypeScript (10.221 Forks)batch import
bughelp wantedlinuxsnap

Repository-Metriken

Stars
 (74.848 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 11h 43m) (1.000 gemergte PRs in 30 T)

Beschreibung

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?

Contributor Guide