juju config prints empty json to stdout for invalid app names

Bug #1983737 reported by Mert Kirpici
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju
Triaged
Medium
Evanson Mwangi

Bug Description

If `juju config` is called with an invalid app or config option name, it will print the an error message into stderr, alongside a valid empty json object into stdout.

miles@mertkirpici-bastion-focal:~$ juju config foo
{}
ERROR application "foo" not found (not found)

miles@mertkirpici-bastion-focal:~$ juju config keystone foo
{}
ERROR key "foo" not found in "keystone" application config or charm settings.

miles@mertkirpici-bastion-focal:~$ juju config keystone foo 2>/dev/null
{}

I am not sure if this is by design, however `list-actions` only prints error into stderr.

miles@mertkirpici-bastion-focal:~$ juju list-actions foo
ERROR application "foo" not found

Tags: cli config
Changed in juju:
status: New → Triaged
importance: Undecided → High
importance: High → Medium
assignee: nobody → Evanson Mwangi (mr-parish)
milestone: none → 2.9.34
tags: added: cli config
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers