Silence stderr in git push during pr create but show it on failures
This commit is contained in:
parent
5bfcab8ba1
commit
5d644d2468
2 changed files with 3 additions and 3 deletions
|
|
@ -40,7 +40,7 @@ func prCreate(cmd *cobra.Command, _ []string) error {
|
|||
}
|
||||
|
||||
if err = git.Push(remote, fmt.Sprintf("HEAD:%s", head)); err != nil {
|
||||
return fmt.Errorf("was not able to push to remote '%s': %s", remote, err)
|
||||
return err
|
||||
}
|
||||
|
||||
title, err := cmd.Flags().GetString("title")
|
||||
|
|
|
|||
|
|
@ -109,8 +109,8 @@ func UncommittedChangeCount() (int, error) {
|
|||
}
|
||||
|
||||
func Push(remote string, ref string) error {
|
||||
cmd := GitCommand("push", "--set-upstream", remote, ref)
|
||||
return cmd.Run()
|
||||
pushCmd := GitCommand("push", "--set-upstream", remote, ref)
|
||||
return utils.PrepareCmd(pushCmd).Run()
|
||||
}
|
||||
|
||||
type BranchConfig struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue