-
Notifications
You must be signed in to change notification settings - Fork 725
Open
Description
There are a few places where Cabal creates a log file for a package build roughly along these lines (grep for removeFile.*log)
initLogFile :: IO ()
initLogFile =
case mlogFile of
Nothing -> return ()
Just logFile -> do
createDirectoryIfMissing True (takeDirectory logFile)
exists <- doesFileExist logFile
when exists $ removeFile logFileThe problem is that if such log file exists, it's likely that it's another instance of Cabal building the same package and of course locking the log file. So removeFile logFile fails with a cryptic access denied error. We should catch the error and write a reasonable error message. Something like "Log file for package foo is locked, probably by another instance of Cabal".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels