Allow --json option for every command where borg accepts it #94
Labels
No Label
bug
data loss
design finalized
good first issue
new feature area
question / support
security
waiting for response
No Milestone
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: borgmatic-collective/borgmatic#94
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Currently, borgmatic accepts
--json
only forlist
andinfo
. Is there any reason it is not implemented for create (borg create --json
exists)?borg
prune
andcheck
do not seem to accept--json
. So there is only create left.Maybe this would also make a less intrusive implementation of https://github.com/witten/borgmatic/pull/26 possible.
Yup, such a feature makes sense to me. I started out with
--json
only forlist
andinfo
because that's where the initial need was. Do you have any initial use cases for--json
oncreate
other than the Prometheus module?Not really a concrete use case, but I think the consistency and ease of the change alone warrants it.
PR #96
Makes sense.
Released with borgmatic 1.2.3!
I'm not really sure, if I got the commit traffic right...
Seems in my original commit
9aaf78b9dd
I added thejson=args.json
parameter at the check, instead of create call.98cb2644db
fixed that by removing it. But the create command call inborgmatic.py
still lacks the json parameter. Right?Yup, your assessment appears to be correct! Let me know if you'd like to fix it or if you'd like me to.
I will take care of it, I also screwed up the previous attempt, so give me change to screw that up, too. ;-)
Idea: Should we add an
ident=2
parameter tojson.dumps
? Will make it look much nicer if a human happens to read the json output.That sounds fine to me. Or you could just pipe the result to something like
jq
.Ok, see #97. Please have a look, to make sure I didn't screw up again.
Tangentially related discussion: #53.
Looks like this got fixed somewhere along the way!