Skip to content

Commit e02f073

Browse files
committed
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.
1 parent 853b54b commit e02f073

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

pkg/app/entry_point.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,13 @@ func Start(buildInfo *BuildInfo, integrationTest integrationTypes.IntegrationTes
125125
os.Exit(0)
126126
}
127127

128-
tempDir, err := os.MkdirTemp(getTempDirBase(), "lazygit-*")
128+
tempDirBase := getTempDirBase()
129+
tempDir, err := os.MkdirTemp(tempDirBase, "lazygit-*")
129130
if err != nil {
131+
if os.IsPermission(err) {
132+
log.Fatalf("Your temp directory (%s) is not writeable. Try if rebooting your machine fixes this.", tempDirBase)
133+
}
134+
130135
log.Fatal(err.Error())
131136
}
132137
defer os.RemoveAll(tempDir)

0 commit comments

Comments
 (0)