mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-09-10 07:36:27 -04:00
Show a better error message if the temp directory is not writeable
This happened to a few users after updating macOS to version 15.7.1, and apparently a reboot fixes it, so suggest this in the error message.
This commit is contained in:
parent
853b54b069
commit
e02f073cd0
|
|
@ -125,8 +125,13 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
|
|||
os.Exit(0)
|
||||
}
|
||||
|
||||
tempDir, err := os.MkdirTemp(getTempDirBase(), "lazygit-*")
|
||||
tempDirBase := getTempDirBase()
|
||||
tempDir, err := os.MkdirTemp(tempDirBase, "lazygit-*")
|
||||
if err != nil {
|
||||
if os.IsPermission(err) {
|
||||
log.Fatalf("Your temp directory (%s) is not writeable. Try if rebooting your machine fixes this.", tempDirBase)
|
||||
}
|
||||
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
defer os.RemoveAll(tempDir)
|
||||
|
|
|
|||
Loading…
Reference in a new issue