mirror of
https://github.com/Microsoft/vscode
synced 2024-10-12 06:17:18 +00:00
Fix #89559
This commit is contained in:
parent
c110357096
commit
fd8411e75e
|
@ -22,7 +22,6 @@ set VSCODE_DEV=1
|
|||
set VSCODE_CLI=1
|
||||
set ELECTRON_ENABLE_LOGGING=1
|
||||
set ELECTRON_ENABLE_STACK_DUMPING=1
|
||||
set VSCODE_LOGS=
|
||||
|
||||
:: Launch Code
|
||||
|
||||
|
|
|
@ -41,7 +41,6 @@ function code() {
|
|||
export VSCODE_CLI=1
|
||||
export ELECTRON_ENABLE_STACK_DUMPING=1
|
||||
export ELECTRON_ENABLE_LOGGING=1
|
||||
export VSCODE_LOGS=
|
||||
|
||||
# Launch Code
|
||||
exec "$CODE" . --no-sandbox "$@"
|
||||
|
|
|
@ -19,7 +19,6 @@ suite('Processes', () => {
|
|||
VSCODE_CLI: 'x',
|
||||
VSCODE_DEV: 'x',
|
||||
VSCODE_IPC_HOOK: 'x',
|
||||
VSCODE_LOGS: 'x',
|
||||
VSCODE_NLS_CONFIG: 'x',
|
||||
VSCODE_PORTABLE: 'x',
|
||||
VSCODE_PID: 'x',
|
||||
|
|
|
@ -200,7 +200,7 @@ class CodeMain {
|
|||
VSCODE_IPC_HOOK: environmentService.mainIPCHandle
|
||||
};
|
||||
|
||||
['VSCODE_NLS_CONFIG', 'VSCODE_LOGS', 'VSCODE_PORTABLE'].forEach(key => {
|
||||
['VSCODE_NLS_CONFIG', 'VSCODE_PORTABLE'].forEach(key => {
|
||||
const value = process.env[key];
|
||||
if (typeof value === 'string') {
|
||||
instanceEnvironment[key] = value;
|
||||
|
|
|
@ -78,6 +78,7 @@ export interface NativeParsedArgs {
|
|||
'force-user-env'?: boolean;
|
||||
'sync'?: 'on' | 'off';
|
||||
'__sandbox'?: boolean;
|
||||
'logsPath'?: string;
|
||||
|
||||
// chromium command line args: https://electronjs.org/docs/all#supported-chrome-command-line-switches
|
||||
'no-proxy-server'?: boolean;
|
||||
|
|
|
@ -112,6 +112,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
|
|||
'force-user-env': { type: 'boolean' },
|
||||
'open-devtools': { type: 'boolean' },
|
||||
'__sandbox': { type: 'boolean' },
|
||||
'logsPath': { type: 'string' },
|
||||
|
||||
// chromium flags
|
||||
'no-proxy-server': { type: 'boolean' },
|
||||
|
|
|
@ -204,12 +204,11 @@ export class NativeEnvironmentService implements INativeEnvironmentService {
|
|||
get disableTelemetry(): boolean { return !!this._args['disable-telemetry']; }
|
||||
|
||||
constructor(protected _args: NativeParsedArgs) {
|
||||
if (!process.env['VSCODE_LOGS']) {
|
||||
if (!_args.logsPath) {
|
||||
const key = toLocalISOString(new Date()).replace(/-|:|\.\d+Z$/g, '');
|
||||
process.env['VSCODE_LOGS'] = path.join(this.userDataPath, 'logs', key);
|
||||
_args.logsPath = path.join(this.userDataPath, 'logs', key);
|
||||
}
|
||||
|
||||
this.logsPath = process.env['VSCODE_LOGS']!;
|
||||
this.logsPath = _args.logsPath;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue