Microsoft/vscode

Overriding XDG_DATA_HOME in snap leads to multiple problems

Open

#237,608 建立於 2025年1月9日

在 GitHub 查看
 (18 留言) (31 反應) (1 負責人)TypeScript (10,221 fork)batch import
bughelp wantedlinuxsnap

倉庫指標

Star
 (74,848 star)
PR 合併指標
 (平均合併 11小時 43分鐘) (30 天內合併 1,000 個 PR)

描述

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?

貢獻者指南