소스 검색

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,
 		opts.EnvironmentName,
 	)
 	)
 
 
-	if resp != nil && resp.StatusCode == http.StatusNotFound {
+	if err == nil && resp != nil && resp.StatusCode == http.StatusOK {
 		_, err = opts.Client.Repositories.DeleteEnvironment(
 		_, err = opts.Client.Repositories.DeleteEnvironment(
 			context.Background(),
 			context.Background(),
 			opts.GitRepoOwner,
 			opts.GitRepoOwner,