[O] Better warning message #419
This commit is contained in:
+1
-1
@@ -382,7 +382,7 @@ def run():
|
|||||||
GLOBAL_CFG.use_overlay = args.overlay
|
GLOBAL_CFG.use_overlay = args.overlay
|
||||||
|
|
||||||
if args.version:
|
if args.version:
|
||||||
print(f'Version is {VERSION}')
|
print(f'Version is 1.99.∞\n(python hyfetch legacy mode)')
|
||||||
return
|
return
|
||||||
|
|
||||||
# Ensure git bash for windows
|
# Ensure git bash for windows
|
||||||
|
|||||||
+4
-1
@@ -1,3 +1,4 @@
|
|||||||
|
import os
|
||||||
import platform
|
import platform
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
@@ -12,7 +13,9 @@ def run_rust():
|
|||||||
pd = Path(__file__).parent.joinpath('rust')
|
pd = Path(__file__).parent.joinpath('rust')
|
||||||
pd = pd.joinpath('hyfetch.exe' if platform.system() == 'Windows' else 'hyfetch')
|
pd = pd.joinpath('hyfetch.exe' if platform.system() == 'Windows' else 'hyfetch')
|
||||||
if not pd.exists():
|
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()
|
run_py()
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user