Skip to content

Commit 135efda

Browse files
committed
Avoid re-wrapping of "could not determine suitable remote" error
1 parent 237fd04 commit 135efda

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

command/pr_create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func prCreate(cmd *cobra.Command, _ []string) error {
3737

3838
remote, err := guessRemote(ctx)
3939
if err != nil {
40-
return errors.Wrap(err, "could not determine suitable remote")
40+
return err
4141
}
4242

4343
if err = git.Push(remote, fmt.Sprintf("HEAD:%s", head)); err != nil {
@@ -179,7 +179,7 @@ func prCreate(cmd *cobra.Command, _ []string) error {
179179
func guessRemote(ctx context.Context) (string, error) {
180180
remotes, err := ctx.Remotes()
181181
if err != nil {
182-
return "", errors.Wrap(err, "could not determine suitable remote")
182+
return "", errors.Wrap(err, "could not read git remotes")
183183
}
184184

185185
// TODO: consolidate logic with fsContext.BaseRepo

0 commit comments

Comments
 (0)