Explorar el Código

fix casing to be on when environment exists

Alexander Belanger hace 4 años
padre
commit
e4ca8de27a
Se han modificado 1 ficheros con 1 adiciones y 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,