back compat fix for info --json on unknown item
This was changed ina0e6fa18eb
in a way that broke datalad, which expected to see a "file" field in the --json. See45ddd4b12f
This commit is contained in:
parent
66fe3b0908
commit
1beca851ff
1 changed files with 5 additions and 1 deletions
|
@ -182,7 +182,11 @@ itemInfo o (si, p) = ifM (isdir (toRawFilePath p))
|
|||
|
||||
noInfo :: String -> SeekInput -> String -> Annex ()
|
||||
noInfo s si msg = do
|
||||
showStartMessage (StartMessage "info" (ActionItemOther (Just (UnquotedString s))) si)
|
||||
-- The string may not really be a file, but use ActionItemTreeFile,
|
||||
-- rather than ActionItemOther to avoid breaking back-compat of
|
||||
-- json output.
|
||||
let ai = ActionItemTreeFile (toRawFilePath s)
|
||||
showStartMessage (StartMessage "info" ai si)
|
||||
showNote (UnquotedString msg)
|
||||
showEndFail
|
||||
Annex.incError
|
||||
|
|
Loading…
Add table
Reference in a new issue