Closed perlpunk closed 8 years ago
In some cases, -j will produce JSON with a trailing comma:
-j
% git hub repo -j { "full_name": "perlpunk/git-hub", "description": "Do GitHub operations from the `git` command", "language": "Shell", "html_url": "https://github.com/perlpunk/git-hub", "ssh_url": "git@github.com:perlpunk/git-hub.git", "forks": 0, "parent/full_name": "ingydotnet/git-hub", "source/full_name": "ingydotnet/git-hub", "watchers": 1, "open_issues": 0, "pushed_at": "2016-05-13T19:53:33Z", "created_at": "2015-06-02T19:31:17Z", }
This happens because of a little mistake in the loop logic in lib/git-hub.d/json-setup.bash pretty-json-object()
lib/git-hub.d/json-setup.bash pretty-json-object()
Without the check for -n this would be the last line:
-n
"privatex":
Fixed the same bug in pretty-json-list() also
pretty-json-list()
Applied. Pushed. Thanks. \o//
In some cases,
-j
will produce JSON with a trailing comma:This happens because of a little mistake in the loop logic in
lib/git-hub.d/json-setup.bash pretty-json-object()
Without the check for
-n
this would be the last line: