Closed henriqueffc closed 12 months ago
Hello Robin @Antiz96
After 3 patch versions, I'm still unable to fix this issue. I have tried build it locally with the PKGBUILD
that Arch repo uses but unable to reproduce it.
It may be because python3 is not available, or python failed to find the help.json
file. Can you please try adding python3
to build dependency explicitly and patching the source file with
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 20a65e01..57d50076 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -221,12 +221,15 @@ endfunction(fastfetch_load_text)
find_package(Python)
if(Python_FOUND)
- # Minify JSON string. `io.open(0,encoding='utf-8')` is needed to avoid encoding issues on Windows
execute_process(COMMAND ${Python_EXECUTABLE} -c "import json,sys;json.dump(json.load(sys.stdin),sys.stdout,separators=(',',':'))"
- INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/data/help.json"
+ INPUT_FILE "${CMAKE_SOURCE_DIR}/src/data/help.json"
OUTPUT_VARIABLE DATATEXT_JSON_HELP)
+ if(DATATEXT_JSON_HELP STREQUAL "")
+ message(ERROR "DATATEXT_JSON_HELP is empty, which should not happen!")
+ endif()
else()
- file(READ "src/data/help.json" TEMP)
+ message(STATUS "Python3 is not found, 'help.json' will not be minified")
+ file(READ "src/data/help.json" DATATEXT_JSON_HELP)
endif()
fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)
and see if it can resolve the issue?
If everything is normal, fastfetch --help
should print like this:
Thanks in advance.
Hi @CarterLi,
Having python installed at build time fixed the issue. Thanks for the hint!
@henriqueffc I uploaded v2.3.3-2 in [extra-testing] as a fix (the package can also be downloaded here). Can you confirm it solves the issue for you too?
Thanks :)
I can confirm the fix in v2.3.3-2
Thanks for help!
I think it's from here
Replacing it with file(READ "src/data/help.json" DATATEXT_JSON_HELP)
should fix the build even when Python is not found.
I think it's from here
Replacing it with
file(READ "src/data/help.json" DATATEXT_JSON_HELP)
should fix the build even when Python is not found.
I was about to modify the Dependencies wiki page to add that python is required at build time for the help message, but I'll wait for @CarterLi input on the above before doing so :)
I think it's from here
Replacing it with
file(READ "src/data/help.json" DATATEXT_JSON_HELP)
should fix the build even when Python is not found.
You are right. It was my mistake.
Another hotfix release will be cut soon. I'm sorry for this issue.
Hi @CarterLi,
Having python installed at build time fixed the issue. Thanks for the hint!
@henriqueffc I uploaded v2.3.3-2 in [extra-testing] as a fix (the package can also be downloaded here). Can you confirm it solves the issue for you too?
Thanks :)
I apologize, I didn't have time to test v2.3.3-2, but v2.3.4-1 is working perfectly.
The
--help
option is incomplete in version 2.3.3 available in the Arch Linux repository. The message shown appears to be incomplete, without all the available options that were presented with the--help
option. I use the Alacritty terminal, with zsh, tmux and p10k. Other options are working correctly.The
fastfetch --help
command displays the following message:image with my use of fastfetch: https://imgur.com/a/QlCFZJO