debug output of git security check probe

This is so, if there's some other failure that triggers it, --debug will
show what went wrong. See https://github.com/datalad/datalad/issues/6708

Sponsored-by: Dartmouth College's Datalad project
This commit is contained in:
Joey Hess 2022-05-31 12:25:11 -04:00
parent f35c551d35
commit dca6e96e31
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -23,6 +23,7 @@ import qualified Git.Command
import qualified Git.Construct
import Utility.UserInfo
import Utility.Process.Transcript
import Utility.Debug
{- Returns a single git config setting, or a fallback value if not set. -}
get :: ConfigKey -> ConfigValue -> Repo -> ConfigValue
@ -288,5 +289,9 @@ checkRepoConfigInaccessible r = do
{ cwd = Just (fromRawFilePath (repoPath r))
, env = gitEnv r
}
(_out, ok) <- processTranscript' p Nothing
return (not ok)
(out, ok) <- processTranscript' p Nothing
if not ok
then do
debug (DebugSource "Git.Config") ("config output: " ++ out)
return True
else return False