Skip to content

Commit ceeb426

Browse files
authored
Merge pull request #223 from fluxcd/stash-repo-panic-fix
2 parents edad107 + 2e3d29a commit ceeb426

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stash/repositories.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (s *RepositoriesService) Create(ctx context.Context, projectKey string, rep
223223
}
224224
res, resp, err := s.Client.Do(req)
225225
if err != nil {
226-
if resp.StatusCode == http.StatusConflict {
226+
if resp != nil && resp.StatusCode == http.StatusConflict {
227227
return nil, ErrAlreadyExists
228228
}
229229
return nil, fmt.Errorf("create respository failed: %w", err)

0 commit comments

Comments
 (0)