confirm removal

This commit is contained in:
Callan Bryant 2020-03-08 14:13:29 +00:00
parent 882643185b
commit 4fd8d5f99d
No known key found for this signature in database
GPG Key ID: C31FA9DF3ACBFFAA

View File

@ -9,6 +9,9 @@ func Remove() {
// TODO non-red
ExitFail("Hostname argument required: dsnet remove <hostname>")
}
ConfirmOrAbort("Do you really want to remove %s?", os.Args[2])
conf := MustLoadDsnetConfig()
hostname := os.Args[2]
conf.MustRemovePeer(hostname)