Skip to content

dnf check-release-update output not stdout #545

Open
@ring-pete

Description

@ring-pete

Description
I am trying to automate detection of new Amazon Linux2023 versions being available using dnf check-release-update and it looks like the output of that command is not sent to stdout. I would assume that I could invoke the command, then assign a variable to the output of it. While text does print to the console, variable assignment or redirection does not work as expected.

To Reproduce
Steps to reproduce the behavior:

  1. Run an Amazon Linux 2023 system
  2. Login as any standard user, ec2-user for example
  3. Execute the following commands:
$ echo $SHELL
/bin/bash
$ cat /etc/amazon-linux-release
Amazon Linux release 2023 (Amazon Linux)
$ VERSION=$(dnf check-release-update --latest-only --version-only)
2023.2.20231030
$ echo $VERSION

$ dnf check-release-update --latest-only --version-only > /tmp/version
2023.2.20231030
$ cat /tmp/version

Expected behavior
I would expect the check-release-update plugin to allow redirection of stdout so that it can be assigned to a variable, or redirected to a file, etc. as any other standard Unix utility would function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions