Skip to content

Commit fd8411e

Browse files
committed
1 parent c110357 commit fd8411e

File tree

7 files changed

+6
-8
lines changed

7 files changed

+6
-8
lines changed

scripts/code.bat

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ set VSCODE_DEV=1
2222
set VSCODE_CLI=1
2323
set ELECTRON_ENABLE_LOGGING=1
2424
set ELECTRON_ENABLE_STACK_DUMPING=1
25-
set VSCODE_LOGS=
2625

2726
:: Launch Code
2827

scripts/code.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ function code() {
4141
export VSCODE_CLI=1
4242
export ELECTRON_ENABLE_STACK_DUMPING=1
4343
export ELECTRON_ENABLE_LOGGING=1
44-
export VSCODE_LOGS=
4544

4645
# Launch Code
4746
exec "$CODE" . --no-sandbox "$@"

src/vs/base/test/common/processes.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ suite('Processes', () => {
1919
VSCODE_CLI: 'x',
2020
VSCODE_DEV: 'x',
2121
VSCODE_IPC_HOOK: 'x',
22-
VSCODE_LOGS: 'x',
2322
VSCODE_NLS_CONFIG: 'x',
2423
VSCODE_PORTABLE: 'x',
2524
VSCODE_PID: 'x',

src/vs/code/electron-main/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ class CodeMain {
200200
VSCODE_IPC_HOOK: environmentService.mainIPCHandle
201201
};
202202

203-
['VSCODE_NLS_CONFIG', 'VSCODE_LOGS', 'VSCODE_PORTABLE'].forEach(key => {
203+
['VSCODE_NLS_CONFIG', 'VSCODE_PORTABLE'].forEach(key => {
204204
const value = process.env[key];
205205
if (typeof value === 'string') {
206206
instanceEnvironment[key] = value;

src/vs/platform/environment/common/argv.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ export interface NativeParsedArgs {
7878
'force-user-env'?: boolean;
7979
'sync'?: 'on' | 'off';
8080
'__sandbox'?: boolean;
81+
'logsPath'?: string;
8182

8283
// chromium command line args: https://electronjs.org/docs/all#supported-chrome-command-line-switches
8384
'no-proxy-server'?: boolean;

src/vs/platform/environment/node/argv.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
112112
'force-user-env': { type: 'boolean' },
113113
'open-devtools': { type: 'boolean' },
114114
'__sandbox': { type: 'boolean' },
115+
'logsPath': { type: 'string' },
115116

116117
// chromium flags
117118
'no-proxy-server': { type: 'boolean' },

src/vs/platform/environment/node/environmentService.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -204,12 +204,11 @@ export class NativeEnvironmentService implements INativeEnvironmentService {
204204
get disableTelemetry(): boolean { return !!this._args['disable-telemetry']; }
205205

206206
constructor(protected _args: NativeParsedArgs) {
207-
if (!process.env['VSCODE_LOGS']) {
207+
if (!_args.logsPath) {
208208
const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
209-
process.env['VSCODE_LOGS'] = path.join(this.userDataPath, 'logs', key);
209+
_args.logsPath = path.join(this.userDataPath, 'logs', key);
210210
}
211-
212-
this.logsPath = process.env['VSCODE_LOGS']!;
211+
this.logsPath = _args.logsPath;
213212
}
214213
}
215214

0 commit comments

Comments
 (0)