debcrafters-packages team mailing list archive
-
debcrafters-packages team
-
Mailing list archive
-
Message #01967
[Bug 2113790] Re: JSON and XML output broken if path invalid
** Tags added: dcr-incoming
--
You received this bug notification because you are a member of
Debcrafters packages, which is subscribed to tree in Ubuntu.
https://bugs.launchpad.net/bugs/2113790
Title:
JSON and XML output broken if path invalid
Status in tree package in Ubuntu:
Triaged
Bug description:
using tree, if the target folder does not exist then the JSON or XML
output options are broken.
XML output (using input flag -X) has no open tag for the name field
and a random close tag for 'unknown'.
JSON output (using input flag -J) creates an array, the JSON object in
the array has no open bracket and the entire 'type' key/value pair is
missing. This makes the JSON object in the array start with a comma.
This issue was discovered on Ubuntu 24.04.2 LTS using tree version v2.1.1
Functionality is correct and as expected on another machine running Ubuntu 18.04.5 LTS using tree version v1.7.0
Unfortunately I do not have another machine with anything newer than
18.04.5 to test when the issue first appeared.
---------------------------------------------------------
1.) $ lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04.2 LTS
Release: 24.04
2.) $ lsb_release -rd
No LSB modules are available.
Description: Ubuntu 24.04.2 LTS
Release: 24.04
showhq@showhq-2025:/usr/lib/cgi-bin/tech$ tree --version
tree v2.1.1 © 1996 - 2023 by Steve Baker, Thomas Moore, Francesc Rocher, Florian Sesser, Kyosuke Tokoro
showhq@showhq-2025:/usr/lib/cgi-bin/tech$ apt-cache policy tree
tree:
Installed: 2.1.1-2ubuntu3
Candidate: 2.1.1-2ubuntu3
Version table:
*** 2.1.1-2ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu noble/universe amd64 Packages
100 /var/lib/dpkg/status
3.) Expected: same as v1.7.0 - valid JSON with the -J flag and valid
XML with the -X flag.
4.) Reality: Invalid JSON and XML
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/tree/+bug/2113790/+subscriptions
References