瀏覽代碼

fix casing to be on when environment exists

Alexander Belanger 4 年之前
父節點
當前提交
e4ca8de27a
共有 1 個文件被更改,包括 1 次插入1 次删除
  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,