mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 04:49:35 +00:00
test resolver: adopt connection-token, polish
This commit is contained in:
parent
e9203eedf9
commit
a0fd6c88eb
|
@ -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
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue