mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 15:46:26 -04:00
Create temp directories inside a "lazygit" folder rather than top-level in /tmp
This is no longer as important now that we fixed the stale, left-over temp dirs caused by daemon mode, but it could still be helpful in case lazygit crashes, or if you have many instances of lazygit running.
This commit is contained in:
parent
6a17144ef4
commit
3a9dbf7341
|
|
@ -124,7 +124,11 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
tempDir, err := os.MkdirTemp("", "lazygit-*")
|
||||
tmpDirBase := filepath.Join(os.TempDir(), "lazygit")
|
||||
if err := os.MkdirAll(tmpDirBase, 0o700); err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
tempDir, err := os.MkdirTemp(tmpDirBase, "")
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue