eclipse-theia/theia

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

Open

#1518 aperta il 15 mar 2018

Vedi su GitHub
 (25 commenti) (7 reazioni) (1 assegnatario)TypeScript (2478 fork)batch import
OS/Ubuntucommunity pulseenhancementhelp wantedpotentially-breaking

Metriche repository

Star
 (18.676 star)
Metriche merge PR
 (Merge medio 15g 4h) (75 PR mergiate in 30 g)

Descrizione

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

Guida contributor