From f64ee7b7e9ac4f3013a1155bf81cb450089277a6 Mon Sep 17 00:00:00 2001 From: Azalea Gui <22280294+hykilpikonna@users.noreply.github.com> Date: Thu, 4 Sep 2025 06:46:20 -0400 Subject: [PATCH] [O] Better warning message #419 --- hyfetch/main.py | 2 +- hyfetch/rs.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/hyfetch/main.py b/hyfetch/main.py index 11ad262a..d8f92fc8 100755 --- a/hyfetch/main.py +++ b/hyfetch/main.py @@ -382,7 +382,7 @@ def run(): GLOBAL_CFG.use_overlay = args.overlay if args.version: - print(f'Version is {VERSION}') + print(f'Version is 1.99.∞\n(python hyfetch legacy mode)') return # Ensure git bash for windows diff --git a/hyfetch/rs.py b/hyfetch/rs.py index 80bafb57..86e23c53 100644 --- a/hyfetch/rs.py +++ b/hyfetch/rs.py @@ -1,3 +1,4 @@ +import os import platform import subprocess import sys @@ -12,7 +13,9 @@ def run_rust(): pd = Path(__file__).parent.joinpath('rust') pd = pd.joinpath('hyfetch.exe' if platform.system() == 'Windows' else 'hyfetch') if not pd.exists(): - printc('&cThe rust executable is not found, falling back to python...') + if 'HYFETCH_DONT_WARN_RUST' not in os.environ: + printc('&cThe executable for hyfetch v2 (rust) is not found, falling back to legacy v1.99.∞ (python).\n' + 'You can add environment variable HYFETCH_DONT_WARN_RUST=1 to suppress this warning.\n') run_py() return