From 404feb5cda8ff0f491495655f57d601fdc7717cf Mon Sep 17 00:00:00 2001 From: Shatakshi Mishra Date: Wed, 13 Nov 2024 09:07:21 +0530 Subject: [PATCH] Allow images subcommand to display the resulting output in JSON format (#1872) * Allow images subcommand to display the resulting output in JSON format * fix codecov failure --- .github/dependabot.yml | 2 ++ .github/workflows/tox.yml | 2 +- src/ansible_navigator/actions/images.py | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 5edc9741d..fa8092944 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -21,6 +21,8 @@ updates: ignore: # prevent ansible-core from being updated until test fixtures are updated - dependency-name: ansible-core + - dependency-name: "codecov/codecov-action" + versions: ["4.6.0"] groups: dependencies: patterns: diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 5bcf355ec..278ac2060 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -159,7 +159,7 @@ jobs: fi - name: Upload coverage data - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v4.5.0 with: name: ${{ matrix.name }} fail_ci_if_error: true diff --git a/src/ansible_navigator/actions/images.py b/src/ansible_navigator/actions/images.py index 1674e3116..b804d130c 100644 --- a/src/ansible_navigator/actions/images.py +++ b/src/ansible_navigator/actions/images.py @@ -193,7 +193,7 @@ def run_stdout_details(self) -> RunStdoutReturn: details["image_name"] = image_name print_to_stdout( content=details, - content_format=ContentFormat.YAML, + content_format=getattr(ContentFormat, self._args.format.upper()), use_color=self._args.display_color, ) return RunStdoutReturn(message="", return_code=0)