better handling on push errors

This commit is contained in:
risk danger olson 2016-02-24 11:20:31 -07:00
parent 4b3b9d5645
commit d52b9832bb
2 changed files with 7 additions and 5 deletions

@ -129,6 +129,9 @@ func prePushRef(left, right string) {
if Debugging || lfs.IsFatalError(err) {
LoggedError(err, err.Error())
} else {
if inner := lfs.GetInnerError(err); inner != nil {
Error(inner.Error())
}
Error(err.Error())
}
}

@ -121,11 +121,7 @@ func uploadsWithObjectIDs(oids []string) *lfs.TransferQueue {
u, err := lfs.NewUploadable(oid, "")
if err != nil {
if Debugging || lfs.IsFatalError(err) {
Panic(err, err.Error())
} else {
Exit(err.Error())
}
ExitWithError(err)
}
uploads = append(uploads, u)
}
@ -206,6 +202,9 @@ func pushCommand(cmd *cobra.Command, args []string) {
if Debugging || lfs.IsFatalError(err) {
LoggedError(err, err.Error())
} else {
if inner := lfs.GetInnerError(err); inner != nil {
Error(inner.Error())
}
Error(err.Error())
}
}