fix error with subnet deletion checks

This commit is contained in:
Adora Laura Kalb 2023-03-15 17:23:14 +01:00
parent 92118a60aa
commit e7786e1822

View file

@ -26,6 +26,11 @@ var subnetdeleteCmd = &cobra.Command{
os.Exit(1)
}
if !SubnetExists(subnet) {
fmt.Printf("[ERROR] Couldn't find subnet %v\n", subnet.String())
os.Exit(1)
}
var confirmation string
fmt.Printf("[WARNING] Do you really want to delete subnet %v? [y/N] ", subnet.String())
fmt.Scan(&confirmation)