Skip to content

Commit

Permalink
fix: improve error message on orb creation (#1019)
Browse files Browse the repository at this point in the history
  • Loading branch information
JulesFaucherre authored Nov 22, 2023
1 parent 0ec7a78 commit 245d193
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/orb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1522,6 +1522,9 @@ func initOrb(opts orbOptions) error {
}

r, err := git.PlainInit(orbPath, false)
if errors.Is(err, git.ErrRepositoryAlreadyExists) {
return errors.New("the folder is already a repository because it has .git folder. Try deleting it and retrying")
}
if err != nil {
return err
}
Expand Down

0 comments on commit 245d193

Please sign in to comment.