Avoid re-wrapping of "could not determine suitable remote" error
This commit is contained in:
parent
237fd04ad0
commit
135efda6d3
1 changed files with 2 additions and 2 deletions
|
|
@ -37,7 +37,7 @@ func prCreate(cmd *cobra.Command, _ []string) error {
|
|||
|
||||
remote, err := guessRemote(ctx)
|
||||
if err != nil {
|
||||
return errors.Wrap(err, "could not determine suitable remote")
|
||||
return err
|
||||
}
|
||||
|
||||
if err = git.Push(remote, fmt.Sprintf("HEAD:%s", head)); err != nil {
|
||||
|
|
@ -179,7 +179,7 @@ func prCreate(cmd *cobra.Command, _ []string) error {
|
|||
func guessRemote(ctx context.Context) (string, error) {
|
||||
remotes, err := ctx.Remotes()
|
||||
if err != nil {
|
||||
return "", errors.Wrap(err, "could not determine suitable remote")
|
||||
return "", errors.Wrap(err, "could not read git remotes")
|
||||
}
|
||||
|
||||
// TODO: consolidate logic with fsContext.BaseRepo
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue