back compat fix for info --json on unknown item
This was changed in a0e6fa18eb
in a way
that broke datalad, which expected to see a "file" field in the --json.
See https://github.com/datalad/datalad/pull/7372/commits/45ddd4b12ff637c6c77e982225c0e9d9eb53c1b6
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 :: String -> SeekInput -> String -> Annex ()
|
||||||
noInfo s si msg = do
|
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)
|
showNote (UnquotedString msg)
|
||||||
showEndFail
|
showEndFail
|
||||||
Annex.incError
|
Annex.incError
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue