export CreateProcess fields from Utility.Process
update code to avoid cwd and env redefinition warnings
This commit is contained in:
parent
6eb5e6c135
commit
a44fd2c019
31 changed files with 458 additions and 480 deletions
|
@ -28,9 +28,9 @@ start :: [FilePath] -> CommandStart
|
|||
start [] = do
|
||||
-- Like git status, when run without a directory, behave as if
|
||||
-- given the path to the top of the repository.
|
||||
cwd <- liftIO getCurrentDirectory
|
||||
currdir <- liftIO getCurrentDirectory
|
||||
top <- fromRepo Git.repoPath
|
||||
start' [relPathDirToFile cwd top]
|
||||
start' [relPathDirToFile currdir top]
|
||||
start locs = start' locs
|
||||
|
||||
start' :: [FilePath] -> CommandStart
|
||||
|
|
|
@ -27,8 +27,8 @@ check = do
|
|||
when (b == Annex.Branch.name) $ error $
|
||||
"cannot uninit when the " ++ Git.fromRef b ++ " branch is checked out"
|
||||
top <- fromRepo Git.repoPath
|
||||
cwd <- liftIO getCurrentDirectory
|
||||
whenM ((/=) <$> liftIO (absPath top) <*> liftIO (absPath cwd)) $
|
||||
currdir <- liftIO getCurrentDirectory
|
||||
whenM ((/=) <$> liftIO (absPath top) <*> liftIO (absPath currdir)) $
|
||||
error "can only run uninit from the top of the git repository"
|
||||
where
|
||||
current_branch = Git.Ref . Prelude.head . lines <$> revhead
|
||||
|
|
|
@ -34,7 +34,6 @@ import Annex.Version
|
|||
|
||||
import Control.Concurrent
|
||||
import Control.Concurrent.STM
|
||||
import System.Process (env, std_out, std_err, cwd)
|
||||
import Network.Socket (HostName)
|
||||
import System.Environment (getArgs)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue