feat: apply patch after setting up subtree

This commit is contained in:
Joe Previte
2020-12-15 15:53:52 -07:00
parent 41bee49d07
commit 51a2a2ad2d
84 changed files with 3360 additions and 191 deletions

View File

@ -128,7 +128,10 @@ function factory(nodeRequire, path, fs, perf) {
function getLanguagePackConfigurations(userDataPath) {
const configFile = path.join(userDataPath, 'languagepacks.json');
try {
return nodeRequire(configFile);
// NOTE@coder: Swapped require with readFile since require is cached and
// we don't restart the server-side portion of code-server when the
// language changes.
return JSON.parse(fs.readFileSync(configFile, 'utf8'));
} catch (err) {
// Do nothing. If we can't read the file we have no
// language pack config.