1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-28 16:02:01 +03:00

use go-errors package to display stacktrace of errors that cause panics

This commit is contained in:
Jesse Duffield
2019-02-11 21:30:27 +11:00
parent 3a607061a2
commit cfe3605e6b
13 changed files with 55 additions and 37 deletions

View File

@ -1,12 +1,13 @@
package commands
import (
"errors"
"fmt"
"os"
"os/exec"
"strings"
"github.com/go-errors/errors"
"github.com/jesseduffield/lazygit/pkg/i18n"
"github.com/jesseduffield/lazygit/pkg/utils"
"github.com/sirupsen/logrus"
@ -27,11 +28,11 @@ func navigateToRepoRootDirectory(stat func(string) (os.FileInfo, error), chdir f
}
if !os.IsNotExist(err) {
return err
return errors.Wrap(err, 0)
}
if err = chdir(".."); err != nil {
return err
return errors.Wrap(err, 0)
}
}
}