watcher: Detect at startup time when there is a stale .git/lock, and remove it so it does not interfere with the automatic commits of changed files.

This commit is contained in:
Joey Hess 2013-10-03 16:57:21 -04:00
parent f8880c4fe4
commit 93dbb7842e
4 changed files with 53 additions and 6 deletions

View file

@ -26,8 +26,8 @@ data ProcessInfo = ProcessInfo ProcessID CmdLine
{- lsof is not in PATH on all systems, so SysConfig may have the absolute
- path where the program was found. Make sure at runtime that lsof is
- available, and if it's not in PATH, adjust PATH to contain it. -}
setupLsof :: IO ()
setupLsof = do
setup :: IO ()
setup = do
let cmd = fromMaybe "lsof" SysConfig.lsof
when (isAbsolute cmd) $ do
path <- getSearchPath