Explorar o código

fix casing to be on when environment exists

Alexander Belanger %!s(int64=4) %!d(string=hai) anos
pai
achega
e4ca8de27a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      internal/integrations/ci/actions/preview.go

+ 1 - 1
internal/integrations/ci/actions/preview.go

@@ -133,7 +133,7 @@ func DeleteEnv(opts *EnvOpts) error {
 		opts.EnvironmentName,
 	)
 
-	if resp != nil && resp.StatusCode == http.StatusNotFound {
+	if err == nil && resp != nil && resp.StatusCode == http.StatusOK {
 		_, err = opts.Client.Repositories.DeleteEnvironment(
 			context.Background(),
 			opts.GitRepoOwner,