Skip to content

Commit

Permalink
Fix stop database cmd (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
mirzakhany authored Sep 10, 2023
1 parent 0d16900 commit 084cd7b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/cmd/stop.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ func runStop(_ *cobra.Command, args []string) error {
// it could be the case that user sent instance id instead of type
// so we try to remove it
// TODO check if database is in detached mode and warn user
if len(args) == 1 {
// TODO hot fixing a bug, need to be refactored
if len(args) == 1 && args[0] != "pg" && args[0] != "rs" && args[0] != "postgres" && args[0] != "redis" {
if err := container.TerminateByID(ctx, args[0]); err != nil {
return err
}
Expand Down

0 comments on commit 084cd7b

Please sign in to comment.