mirror of
https://github.com/coder/code-server.git
synced 2025-07-28 20:43:24 +08:00
feat: apply patch after setting up subtree
This commit is contained in:
@ -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.
|
||||
|
Reference in New Issue
Block a user