more explicit --rm instructions + erroring out if no --id provided
This commit is contained in:
@@ -92,10 +92,14 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
// Function called to stop and remove server from Docker
|
||||
if RemoveVM != "" && ID != "" {
|
||||
err := client.RemoveContianer(RemoveVM, ID)
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
if RemoveVM != "" {
|
||||
if ID == "" {
|
||||
fmt.Println("provide container ID via --ID or --id")
|
||||
} else {
|
||||
err := client.RemoveContianer(RemoveVM, ID)
|
||||
if err != nil {
|
||||
fmt.Print(err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -178,7 +182,7 @@ var CliAction = func(ctx *cli.Context) error {
|
||||
fmt.Println("Success")
|
||||
}
|
||||
} else {
|
||||
fmt.Println("provide container ID")
|
||||
fmt.Println("provide container ID via --ID or --id")
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user