mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Change log path to state dir
This commit is contained in:
parent
2c0520bc4b
commit
7cef4f4e33
|
|
@ -243,15 +243,6 @@ func (c *AppConfig) GetTempDir() string {
|
|||
return c.TempDir
|
||||
}
|
||||
|
||||
func configFilePath(filename string) (string, error) {
|
||||
exists, path := findConfigFile(filename)
|
||||
|
||||
if exists {
|
||||
return path, nil
|
||||
}
|
||||
return path, os.MkdirAll(filepath.Dir(path), 0o755)
|
||||
}
|
||||
|
||||
// findConfigFile looks for a possibly existing config file.
|
||||
// This function does NOT create any folders or files.
|
||||
func findConfigFile(filename string) (exists bool, path string) {
|
||||
|
|
@ -389,5 +380,5 @@ func LogPath() (string, error) {
|
|||
return os.Getenv("LAZYGIT_LOG_PATH"), nil
|
||||
}
|
||||
|
||||
return configFilePath("development.log")
|
||||
return stateFilePath("development.log")
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue