This commit is contained in:
Sandeep Somavarapu 2020-11-02 16:20:49 +01:00
parent c110357096
commit fd8411e75e
7 changed files with 6 additions and 8 deletions

View file

@ -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

View file

@ -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 "$@"

View file

@ -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',

View file

@ -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;

View file

@ -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;

View file

@ -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' },

View file

@ -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;
}
}