avoid needing --force on windows despite no lsof
Note that I still need to think this through and make sure handling of open files is safe. This is just for testing purposes.
This commit is contained in:
parent
51b43f2b68
commit
2066e90421
1 changed files with 4 additions and 0 deletions
|
@ -50,9 +50,13 @@ import Data.Time.Clock
|
|||
checkCanWatch :: Annex ()
|
||||
checkCanWatch
|
||||
| canWatch = do
|
||||
#ifndef mingw32_HOST_OS
|
||||
liftIO Lsof.setup
|
||||
unlessM (liftIO (inPath "lsof") <||> Annex.getState Annex.force)
|
||||
needLsof
|
||||
#else
|
||||
noop
|
||||
#endif
|
||||
| otherwise = error "watch mode is not available on this system"
|
||||
|
||||
needLsof :: Annex ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue