Skip to content

Commit

Permalink
Merge pull request #249 from zhhuabj/json_not_support
Browse files Browse the repository at this point in the history
The command 'juju show-cloud' does not support JSON format
  • Loading branch information
dosaboy authored Sep 19, 2024
2 parents e2a1c85 + bbb3235 commit 221e116
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions common/helpers
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ list_overlays ()

get_cloud_type ()
{
local cloud=$(juju show-model --format json |jq -r '[.[].cloud] | unique[]')
local type=$(juju show-cloud $cloud --format json | jq -r '[.[].type] | unique[]')
local cloud=`juju show-model| sed -rn 's/.+cloud:\s*(.+).*/\1/p'| uniq`
local type=`juju show-cloud $cloud| sed -rn 's/^type:\s*(.+).*/\1/p'| uniq`
echo "$type"
}

Expand Down

0 comments on commit 221e116

Please sign in to comment.