From 22f9a8d3b8e3c229409579caff077ec90fbac9a3 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 20 Nov 2023 14:52:32 +0200 Subject: [PATCH] fix(juju): add `public-address` fallback to `jaddr` (#12046) --- plugins/juju/juju.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/juju/juju.plugin.zsh b/plugins/juju/juju.plugin.zsh index 0c60e35ce..a82ebaf84 100644 --- a/plugins/juju/juju.plugin.zsh +++ b/plugins/juju/juju.plugin.zsh @@ -98,7 +98,7 @@ jaddr() { elif [[ $# -eq 2 ]]; then # Get unit address juju status "$1/$2" --format=json \ - | jq -r ".applications.\"$1\".units.\"$1/$2\".address" + | jq -r ".applications.\"$1\".units.\"$1/$2\" | .address // .\"public-address\"" else echo "Invalid number of arguments." echo "Usage: jaddr []"