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:
@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user