git-annex/CmdLine
Joey Hess be36e208c2
json object for FileNotFound
When a nonexistant file is passed to a command and  --json-error-messages
is enabled, output a JSON object indicating the problem.

(But git ls-files --error-unmatch still displays errors about such files in
some situations.)

I don't like the duplication of the name of the command introduced by this,
but I can't see a great way around it. One way would be to pass the Command
instead.

When json is not enabled, the stderr is unchanged. This is necessary
because some commands like find have custom output. So dislaying
"find foo not found" would be wrong. So had to complicate things with
toplevelFileProblem having different output with and without json.

When not using --json-error-messages but still using --json, it displays
the error to stderr, but does display a json object without the error. It
does have an errorid though. Unsure how useful that behavior is.

Sponsored-by: Dartmouth College's Datalad project
2023-04-25 19:26:20 -04:00
..
GitAnnex Revert "--json-exceptions" 2023-04-25 17:37:34 -04:00
GitAnnexShell remove git-annex-shell compat code 2021-10-11 15:36:51 -04:00
Action.hs filter out control characters in warning messages 2023-04-10 15:55:44 -04:00
AnnexSetter.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Batch.hs use lookupKeyStaged in --batch code paths 2022-10-26 14:43:06 -04:00
GitAnnex.hs configremote 2023-04-18 15:30:49 -04:00
GitAnnexShell.hs Apply codespell -w throughout 2023-03-17 15:14:58 -04:00
GitRemoteTorAnnex.hs filter out control characters in error messages 2023-04-10 13:50:51 -04:00
Option.hs remove --backend from global options 2022-06-29 13:33:25 -04:00
Seek.hs json object for FileNotFound 2023-04-25 19:26:20 -04:00
Usage.hs add FIELD?=GLOB to git-annex view usage 2023-02-07 18:09:10 -04:00