mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-08 09:08:48 +01:00
test resolver: adopt connection-token, polish
This commit is contained in:
@@ -94,7 +94,7 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
env['VSCODE_AGENT_FOLDER'] = remoteDataDir;
|
||||
outputChannel.appendLine(`Using data folder at ${remoteDataDir}`);
|
||||
|
||||
const connectionTokenFile = path.join(remoteDataDir, `${new Date().getTime()}.token`);
|
||||
const connectionTokenFile = path.join(remoteDataDir, `${process.pid}-${new Date().getTime()}.token`);
|
||||
fs.writeFileSync(connectionTokenFile, connectionToken);
|
||||
commandArgs.push('--connection-token-file', connectionTokenFile);
|
||||
|
||||
@@ -140,6 +140,11 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
if (extHostProcess) {
|
||||
terminateProcess(extHostProcess, context.extensionPath);
|
||||
}
|
||||
try {
|
||||
fs.unlinkSync(connectionTokenFile);
|
||||
} catch (_e) {
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user