mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-10 13:37:25 +01:00
1 parent
b282ac5d47
commit
f9f15ba844
1 file changed
+1
-10
+1
-10
@@ -24,16 +24,7 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va
|
||||
options->processingTimeout = (int32_t) yyjson_get_int(val);
|
||||
else if (ffStrEqualsIgnCase(key, "preRun"))
|
||||
{
|
||||
FF_STRBUF_AUTO_DESTROY _ = ffStrbufCreate();
|
||||
const char* error = ffProcessAppendStdOut(&_, (char* const[]) {
|
||||
#ifdef _WIN32
|
||||
"cmd.exe", "/C",
|
||||
#else
|
||||
"/bin/sh", "-c",
|
||||
#endif
|
||||
(char*) yyjson_get_str(val), NULL
|
||||
});
|
||||
if (error)
|
||||
if (system(yyjson_get_str(val)) < 0)
|
||||
return "Failed to execute preRun command";
|
||||
}
|
||||
else if (ffStrEqualsIgnCase(key, "detectVersion"))
|
||||
|
||||
Reference in new issue
Block a user