mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
Fastfetch: don't expand envs in --config
Since it can only be used in command line
This commit is contained in:
+2
-3
@@ -483,10 +483,8 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
|
||||
if(isJsonConfig ? parseJsoncFile(value) : parseConfigFile(data, value))
|
||||
return;
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(128);
|
||||
if (ffPathExpandEnv(value, &absolutePath))
|
||||
{
|
||||
bool success = isJsonConfig ? parseJsoncFile(absolutePath.chars) : parseConfigFile(data, absolutePath.chars);
|
||||
bool success = isJsonConfig ? parseJsoncFile(value) : parseConfigFile(data, value);
|
||||
|
||||
if(success)
|
||||
return;
|
||||
@@ -494,6 +492,7 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
|
||||
|
||||
//Try to load as a relative path
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(128);
|
||||
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
|
||||
{
|
||||
//We need to copy it, because if a config file loads a config file, the value of path must be unchanged
|
||||
|
||||
Reference in New Issue
Block a user