Skip to content

grubforge --version launches the TUI instead of printing a version #22

Description

@jetomev

Summary

grubforge --version does not print a version — it launches the full TUI. So does grubforge --help, grubforge -v, and grubforge anything-at-all. No arguments are handled anywhere.

Why it matters

Checking the installed version is the first thing anyone does when reporting a bug, following an upgrade, or confirming a package landed. Right now that lands you inside a bootloader manager you didn't mean to open, and you have to press q to escape.

It is also the standard thing a maintainer or packager tries first, and the standard thing that is expected to work.

The version is already known in three places — grubforge/__init__.py __version__, grubforge/app.py VERSION, and the sidebar — so nothing needs to be computed, only printed.

Current behaviour

/usr/bin/grubforge forwards everything straight through:

#!/bin/sh
exec python /usr/lib/grubforge/main.py "$@"

and main.py ignores it entirely:

from grubforge.app import GrubForgeApp

if __name__ == "__main__":
    app = GrubForgeApp()
    app.run()

There is no argparse and no sys.argv reference anywhere in the package.

Suggested behaviour

Minimal and boring is right here:

  • --version / -V → grubForge 1.1.0, exit 0
  • --help / -h → one-line description, the flags, and a pointer to man grubforge, exit 0
  • an unrecognised flag → short usage on stderr, non-zero exit — rather than silently opening the TUI
  • no arguments → launch the TUI, exactly as today

Take the version from grubforge.__version__ so there is one source rather than a fourth copy to drift. grubforge/app.py's VERSION should ideally read from it too — it was already found stale once during the v1.1.0 release, and again in v1.0.3 before that.

Not new in v1.1.0

Present since v1.0.0. Noticed on 2026-08-23 while verifying the packaged v1.1.0 install, when grubforge --version opened the interface and had to be killed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions