Skip to content

Commit

Permalink
fix: when test failed, didn't exit correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
alexppg committed Aug 11, 2021
1 parent 53879c9 commit 24c515d
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions cmd/test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package cmd

import (
"os"
"strings"

"github.com/apex/log"
Expand Down Expand Up @@ -40,6 +41,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -51,6 +54,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -62,6 +67,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -73,6 +80,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -83,6 +92,8 @@ func test(cmd *cobra.Command, args []string) {
logger.WithError(err).Error("An error was detected, exiting")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -94,6 +105,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -105,6 +118,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -116,6 +131,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -127,6 +144,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand All @@ -138,6 +157,8 @@ func test(cmd *cobra.Command, args []string) {
logger.Warn("Destroy")
_ = cli.Destroy(configuration, logger)

os.Exit(1)

return
}

Expand Down

0 comments on commit 24c515d

Please sign in to comment.