mirror of
https://github.com/coder/code-server.git
synced 2026-05-30 18:26:12 +02:00
Update to VS Code 1.52.1
This commit is contained in:
@@ -16,7 +16,16 @@ if (typeof process !== 'undefined') {
|
||||
|
||||
// Native sandbox environment
|
||||
else if (typeof globals.vscode !== 'undefined') {
|
||||
safeProcess = globals.vscode.process;
|
||||
safeProcess = {
|
||||
|
||||
// Supported
|
||||
get platform(): 'win32' | 'linux' | 'darwin' { return globals.vscode.process.platform; },
|
||||
get env() { return globals.vscode.process.env; },
|
||||
nextTick(callback: (...args: any[]) => void): void { return setImmediate(callback); },
|
||||
|
||||
// Unsupported
|
||||
cwd(): string { return globals.vscode.process.env['VSCODE_CWD'] || globals.vscode.process.execPath.substr(0, globals.vscode.process.execPath.lastIndexOf(globals.vscode.process.platform === 'win32' ? '\\' : '/')); }
|
||||
};
|
||||
}
|
||||
|
||||
// Web environment
|
||||
@@ -29,8 +38,7 @@ else {
|
||||
|
||||
// Unsupported
|
||||
get env() { return Object.create(null); },
|
||||
cwd(): string { return '/'; },
|
||||
getuid(): number { return -1; }
|
||||
cwd(): string { return '/'; }
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user