diff --git a/commands/command_pre_push.go b/commands/command_pre_push.go index cdc3f7fd..64e129a3 100644 --- a/commands/command_pre_push.go +++ b/commands/command_pre_push.go @@ -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()) } } diff --git a/commands/command_push.go b/commands/command_push.go index c073b0e9..2a12416f 100644 --- a/commands/command_push.go +++ b/commands/command_push.go @@ -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()) } }