eclipse-theia/theia

Theia apps: option to respect each operating system standards when chosing their user-level `config folder` path

Open

#1,518 建立於 2018年3月15日

在 GitHub 查看
 (25 留言) (7 反應) (1 負責人)TypeScript (18,676 star) (2,478 fork)batch import
OS/Ubuntucommunity pulseenhancementhelp wantedpotentially-breaking

描述

Update:

  • Though below we refer to Linux, we should aim to use the correct paths on every OS
  • This could be a disruptive change for Theia adopters (that make their own IDE, among others). We should make it easy for them to keep using the current folders, going forward, if they chose. Even if they plan to use the new folders, they can do it on their own time-table. Using a legacy vs standard config path could be behind a preference, e.g. "Use legacy theia config folder".
  • We need to also consider how to migrate the content of the old config folder, to the new one (e.g. copy vs move vs use both)

The XDG Base Directory Specification is the closest thing Linux has to a standard of where to put files. We should try to respect it as much as possible. Currently, we just put things in $HOME/.theia. For example, the user should be able to override where the local config is with the XDG_CONFIG_HOME env var. If it is not set, it should fallback to $HOME/.config.

This NPM module should make it easy to get the directory paths (not sure it works cross-platform though):

https://www.npmjs.com/package/xdg-basedir

貢獻者指南