avoid chdir when already inside worktree
This commit is contained in:
parent
0093a456e8
commit
9d98144776
1 changed files with 3 additions and 1 deletions
|
@ -35,7 +35,9 @@ get = do
|
|||
case wt of
|
||||
Nothing -> return r
|
||||
Just d -> do
|
||||
changeWorkingDirectory d
|
||||
cwd <- getCurrentDirectory
|
||||
unless (d `dirContains` cwd) $
|
||||
changeWorkingDirectory d
|
||||
return $ addworktree wt r
|
||||
where
|
||||
pathenv s = do
|
||||
|
|
Loading…
Reference in a new issue