1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Log when directory is changed

This commit is contained in:
Jesse Duffield
2023-07-16 18:12:26 +10:00
parent 6b4a638415
commit ae0193698e
5 changed files with 21 additions and 6 deletions

View File

@ -149,6 +149,8 @@ func (self *ReposHelper) DispatchSwitchTo(path string, reuse bool, errMsg string
return nil
}
self.c.LogCommand(fmt.Sprintf("Changing directory to %s", path), false)
if err := os.Chdir(path); err != nil {
if os.IsNotExist(err) {
return self.c.ErrorMsg(errMsg)