MCPcopy Index your code
hub / github.com/microsoft/vscode-cpptools / removeSshTargetImpl

Function removeSshTargetImpl

Extension/src/Debugger/extension.ts:216–229  ·  view source on GitHub ↗
(node: TargetLeafNode)

Source from the content-addressed store, hash-verified

214}
215
216async function removeSshTargetImpl(node: TargetLeafNode): Promise<boolean> {
217 const labelYes: string = localize('yes', 'Yes');
218 const labelNo: string = localize('no', 'No');
219 const confirm: string | undefined = await vscode.window.showInformationMessage(localize('ssh.target.delete.confirmation', 'Are you sure you want to permanently delete "{0}"?', node.name), labelYes, labelNo);
220 if (!confirm || confirm === labelNo) {
221 return false;
222 }
223
224 const parsedSshConfig: Configuration = await getSshConfiguration(node.sshConfigHostInfo.file, false);
225 parsedSshConfig.remove({ Host: node.name });
226 await writeSshConfiguration(node.sshConfigHostInfo.file, parsedSshConfig);
227
228 return true;
229}

Callers

nothing calls this directly

Calls 4

getSshConfigurationFunction · 0.90
writeSshConfigurationFunction · 0.90
removeMethod · 0.65

Tested by

no test coverage detected