(node: TargetLeafNode)
| 214 | } |
| 215 | |
| 216 | async 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 | } |
nothing calls this directly
no test coverage detected