diff --git a/src/vs/server/@types/code-server-lib/index.d.ts b/src/vs/server/@types/code-server-lib/index.d.ts index 42ae096cbb651..1518d5c2fb607 100644 --- a/src/vs/server/@types/code-server-lib/index.d.ts +++ b/src/vs/server/@types/code-server-lib/index.d.ts @@ -126,8 +126,6 @@ declare global { executableName: string; } - export type RemoteCLIMain = (desc: ProductDescription, args: string[]) => void; - export interface IServerAPI { handleRequest(req: http.IncomingMessage, res: http.ServerResponse): Promise; handleUpgrade(req: http.IncomingMessage, socket: net.Socket): void; diff --git a/src/vs/server/remoteCli.ts b/src/vs/server/remoteCli.ts index faaf2e537552b..f09624b6e1cd6 100644 --- a/src/vs/server/remoteCli.ts +++ b/src/vs/server/remoteCli.ts @@ -410,6 +410,5 @@ function mapFileToRemoteUri(uri: string): string { return uri.replace(/^file:\/\//, 'vscode-remote://' + cliRemoteAuthority); } -// let [, , productName, version, commit, executableName, ...remainingArgs] = process.argv; -// main({ productName, version, commit, executableName }, remainingArgs); - +let [, , productName, version, commit, executableName, ...remainingArgs] = process.argv; +main({ productName, version, commit, executableName }, remainingArgs); diff --git a/src/vs/workbench/api/node/extHostExtensionService.ts b/src/vs/workbench/api/node/extHostExtensionService.ts index b237c4e4e635e..a0aaefd1f53c1 100644 --- a/src/vs/workbench/api/node/extHostExtensionService.ts +++ b/src/vs/workbench/api/node/extHostExtensionService.ts @@ -3,6 +3,9 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ +import { promises as fs } from 'fs'; +import * as os from 'os' +import * as path from 'vs/base/common/path'; import * as performance from 'vs/base/common/performance'; import { createApiFactoryAndRegisterActors } from 'vs/workbench/api/common/extHost.api.impl'; import { RequireInterceptor } from 'vs/workbench/api/common/extHostRequireInterceptor'; @@ -59,6 +62,14 @@ export class ExtHostExtensionService extends AbstractExtHostExtensionService { if (this._initData.remote.isRemote && this._initData.remote.authority) { const cliServer = this._instaService.createInstance(CLIServer); process.env['VSCODE_IPC_HOOK_CLI'] = cliServer.ipcHandlePath; + + /** + * Write this out so we can get the most recent path. + * @author coder + */ + fs.writeFile(path.join(os.tmpdir(), 'vscode-ipc'), cliServer.ipcHandlePath).catch((error) => { + this._logService.error(error); + }); } // Module loading tricks