use setCurrentDirectory
On POSIX, this just calls changeWorkingDirectory.
This commit is contained in:
parent
18bdff3fae
commit
1e2ddcb68a
5 changed files with 8 additions and 18 deletions
|
@ -9,10 +9,6 @@
|
|||
|
||||
module Git.CurrentRepo where
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
import System.Posix.Directory (changeWorkingDirectory)
|
||||
#endif
|
||||
|
||||
import Common
|
||||
import Git.Types
|
||||
import Git.Construct
|
||||
|
@ -39,11 +35,9 @@ get = do
|
|||
case wt of
|
||||
Nothing -> return r
|
||||
Just d -> do
|
||||
#ifndef __WINDOWS__
|
||||
cwd <- getCurrentDirectory
|
||||
unless (d `dirContains` cwd) $
|
||||
changeWorkingDirectory d
|
||||
#endif
|
||||
setCurrentDirectory d
|
||||
return $ addworktree wt r
|
||||
where
|
||||
pathenv s = do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue