Skip to content

Commit

Permalink
fix: do not override user-defined THEIA_CONFIG_DIR (#13708)
Browse files Browse the repository at this point in the history
Fixes #13700

Contributed on behalf of STMicroelectronics

Signed-off-by: Olaf Lessenich <olessenich@eclipsesource.com>
  • Loading branch information
xai authored May 15, 2024
1 parent a9f3c77 commit da32fed
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/src/node/env-variables/env-variables-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ export class EnvVariablesServerImpl implements EnvVariablesServer {
}

protected async createConfigDirUri(): Promise<string> {
if (process.env.THEIA_CONFIG_DIR) {
// this has been explicitly set by the user, so we do not override its value
return FileUri.create(process.env.THEIA_CONFIG_DIR).toString();
}

const dataFolderPath = join(BackendApplicationPath, 'data');
const userDataPath = join(dataFolderPath, 'user-data');
const dataFolderExists = this.pathExistenceCache[dataFolderPath] ??= await pathExists(dataFolderPath);
Expand Down

0 comments on commit da32fed

Please # to comment.