Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: improve error message on orb creation
Browse files Browse the repository at this point in the history
JulesFaucherre committed Nov 22, 2023
1 parent 0ec7a78 commit 52edb96
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
@@ -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
}

0 comments on commit 52edb96

Please sign in to comment.