Revert "--json-exceptions"
This reverts commit a325524454
.
Turns out this was predicated on an incorrect belief that json output
didn't already sometimes lack the "key" field. Since json output already
can when `giveup` was used, it seems unncessary to add a whole new
option for this.
This commit is contained in:
parent
7c514d717b
commit
91ba0cc7fd
33 changed files with 115 additions and 304 deletions
|
@ -445,20 +445,13 @@ jsonOptions =
|
|||
<> help "include error messages in JSON"
|
||||
<> hidden
|
||||
)
|
||||
, annexFlag (setAnnexState $ Annex.setOutput (JSONOutput jsonexceptionsoptions))
|
||||
( long "json-exceptions"
|
||||
<> help "include exceptions in JSON"
|
||||
<> hidden
|
||||
)
|
||||
]
|
||||
where
|
||||
stdjsonoptions = JSONOptions
|
||||
{ jsonProgress = False
|
||||
, jsonErrorMessages = False
|
||||
, jsonExceptions = False
|
||||
}
|
||||
jsonerrormessagesoptions = stdjsonoptions { jsonErrorMessages = True }
|
||||
jsonexceptionsoptions = stdjsonoptions { jsonExceptions = True }
|
||||
|
||||
jsonProgressOption :: [AnnexOption]
|
||||
jsonProgressOption =
|
||||
|
@ -472,7 +465,6 @@ jsonProgressOption =
|
|||
jsonoptions = JSONOptions
|
||||
{ jsonProgress = True
|
||||
, jsonErrorMessages = False
|
||||
, jsonExceptions = False
|
||||
}
|
||||
|
||||
-- Note that a command that adds this option should wrap its seek
|
||||
|
|
|
@ -568,9 +568,9 @@ workTreeItems' (AllowHidden allowhidden) ww ps = case ww of
|
|||
let p' = toRawFilePath p
|
||||
relf <- liftIO $ relPathCwdToFile p'
|
||||
ifM (not <$> (exists p' <||> hidden currbranch relf))
|
||||
( prob FileNotFound (QuotedPath (toRawFilePath p) <> " not found")
|
||||
( prob (QuotedPath (toRawFilePath p) <> " not found")
|
||||
, ifM (viasymlink stopattop (upFrom relf))
|
||||
( prob FileBeyondSymbolicLink (QuotedPath (toRawFilePath p) <> " is beyond a symbolic link")
|
||||
( prob (QuotedPath (toRawFilePath p) <> " is beyond a symbolic link")
|
||||
, return True
|
||||
)
|
||||
)
|
||||
|
@ -605,8 +605,8 @@ workTreeItems' (AllowHidden allowhidden) ww ps = case ww of
|
|||
<$> catObjectMetaDataHidden f currbranch
|
||||
| otherwise = return False
|
||||
|
||||
prob eid msg = do
|
||||
showException False eid msg
|
||||
prob msg = do
|
||||
toplevelWarning False msg
|
||||
Annex.incError
|
||||
return False
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue