mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-13 03:28:33 -05:00
Change some of the env vars to be ADS-specific (#5636)
* Change some of the env vars to be ADS-specific * Undo changes to ext host IPC hook * Keep VSCODE_LOGS vars too
This commit is contained in:
@@ -68,7 +68,7 @@ export function getConfigTracingLevel(): string {
|
||||
}
|
||||
|
||||
export function getDefaultLogDir(): string {
|
||||
return path.join(process.env['VSCODE_LOGS'], '..', '..', 'mssql');
|
||||
return path.join(process.env['ADS_LOGS'], '..', '..', 'mssql');
|
||||
}
|
||||
|
||||
export function getDefaultLogFile(prefix: string, pid: number): string {
|
||||
|
||||
@@ -251,7 +251,9 @@ function patchEnvironment(environmentService: IEnvironmentService): typeof proce
|
||||
const instanceEnvironment: typeof process.env = {
|
||||
VSCODE_IPC_HOOK: environmentService.mainIPCHandle,
|
||||
VSCODE_NLS_CONFIG: process.env['VSCODE_NLS_CONFIG'],
|
||||
VSCODE_LOGS: process.env['VSCODE_LOGS']
|
||||
VSCODE_LOGS: process.env['VSCODE_LOGS'],
|
||||
// {{SQL CARBON EDIT}} We keep VSCODE_LOGS to not break functionality for merged code
|
||||
ADS_LOGS: process.env['ADS_LOGS']
|
||||
};
|
||||
|
||||
if (process.env['VSCODE_PORTABLE']) {
|
||||
|
||||
@@ -266,8 +266,14 @@ export class EnvironmentService implements IEnvironmentService {
|
||||
const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
|
||||
process.env['VSCODE_LOGS'] = path.join(this.userDataPath, 'logs', key);
|
||||
}
|
||||
// {{SQL CARBON EDIT}} Note we keep the VSCODE_LOGS var above in case merges come in that use that so we don't
|
||||
// break functionality. ADS code should always use ADS_LOGS when referring to the log path
|
||||
if (!process.env['ADS_LOGS']) {
|
||||
const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
|
||||
process.env['ADS_LOGS'] = path.join(this.userDataPath, 'logs', key);
|
||||
}
|
||||
|
||||
this.logsPath = process.env['VSCODE_LOGS']!;
|
||||
this.logsPath = process.env['ADS_LOGS']!;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user