uninit: Support --json and --json-error-messages
Had to convert uninit to do everything that can error out inside a CommandStart. This was harder than feels nice. (Also, in passing, converted CommandCheck to use a data type, not a weird number that it was not clear how it managed to be unique.) Sponsored-By: the NIH-funded NICEMAN (ReproNim TR&D3) project
This commit is contained in:
parent
1904cebbb3
commit
271f3b1ab4
7 changed files with 128 additions and 77 deletions
|
@ -78,7 +78,7 @@ checkDirectory mdir = do
|
|||
{- Modifies a Command to check that it is run in either a git-annex
|
||||
- repository, or a repository with a gcrypt-id set. -}
|
||||
gitAnnexShellCheck :: Command -> Command
|
||||
gitAnnexShellCheck = addCheck okforshell . dontCheck repoExists
|
||||
gitAnnexShellCheck = addCheck GitAnnexShellOk okforshell . dontCheck repoExists
|
||||
where
|
||||
okforshell = unlessM (isInitialized <||> isJust . gcryptId <$> Annex.getGitConfig) $
|
||||
giveup "Not a git-annex or gcrypt repository."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue