webapp: Display any error message from git init if it fails to create a repository.
This commit is contained in:
parent
7dfa97ffaf
commit
9d6fd5b927
6 changed files with 56 additions and 36 deletions
|
@ -276,8 +276,9 @@ startFullAssistant path = do
|
|||
{- Makes a new git repository. -}
|
||||
makeRepo :: FilePath -> Bool -> IO ()
|
||||
makeRepo path bare = do
|
||||
unlessM (boolSystem "git" params) $
|
||||
error "git init failed!"
|
||||
(transcript, ok) <- processTranscript "git" (toCommand params) Nothing
|
||||
unless ok $
|
||||
error $ "git init failed!\nOutput:\n" ++ transcript
|
||||
where
|
||||
baseparams = [Param "init", Param "--quiet"]
|
||||
params
|
||||
|
|
|
@ -210,7 +210,7 @@ testServer sshinput@(SshInput { inputHostname = Just hn }) = do
|
|||
(inputUsername sshinput)
|
||||
, remotecommand
|
||||
]
|
||||
parsetranscript . fst <$> sshTranscript sshopts ""
|
||||
parsetranscript . fst <$> sshTranscript sshopts Nothing
|
||||
parsetranscript s
|
||||
| reported "git-annex-shell" = UsableSshInput
|
||||
| reported shim = UsableSshInput
|
||||
|
@ -230,7 +230,7 @@ testServer sshinput@(SshInput { inputHostname = Just hn }) = do
|
|||
- and if it succeeds, runs an action. -}
|
||||
sshSetup :: [String] -> String -> Handler RepHtml -> Handler RepHtml
|
||||
sshSetup opts input a = do
|
||||
(transcript, ok) <- liftIO $ sshTranscript opts input
|
||||
(transcript, ok) <- liftIO $ sshTranscript opts (Just input)
|
||||
if ok
|
||||
then a
|
||||
else showSshErr transcript
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue