Date: Wed, 22 Jan 2025 15:51:45 +0000 From: bugzilla-noreply@freebsd.org To: pkg@FreeBSD.org Subject: [Bug 284263] ports-mgmt/pkg: [1.21.3] --raw-format is broken when multiple packages are supplied Message-ID: <bug-284263-32340@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284263 Bug ID: 284263 Summary: ports-mgmt/pkg: [1.21.3] --raw-format is broken when multiple packages are supplied Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: pkg@FreeBSD.org Reporter: dch@freebsd.org Assignee: pkg@FreeBSD.org Flags: maintainer-feedback?(pkg@FreeBSD.org) pkg version: pkg-1.21.3, json_verify comes from devel/yajl $ pkg info --raw --raw-format json pkg | json_verify JSON is valid $ pkg info --raw --raw-format json pkg bash | json_verify parse error: trailing garbage { "name": "pkg", "orig (right here) ------^ JSON is invalid This is because `pkg info .. $THING` returns a JSON object, but `pkg info .. $THING1 $THING2` returns 2 JSON objects: ``` ... }{ "name": "bash", "origin": "shells/bash", ... ``` One possible solution is to wrap multiple packages in an array, and add a , separator. Also, --raw-format *requires* --raw, perhaps set --raw flag if --raw-format is already found on command line. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-284263-32340>