mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
LocalIP: fix --localip-default-route-only false not working with --gen-config
Some checks are pending
CI / spellcheck (push) Waiting to run
CI / No-features-test (push) Waiting to run
CI / Linux-amd64 (push) Waiting to run
CI / Linux-aarch64 (push) Waiting to run
CI / Linux-armv7l (push) Waiting to run
CI / Linux-armv6l (push) Waiting to run
CI / Linux-riscv64 (push) Waiting to run
CI / Linux-ppc64le (push) Waiting to run
CI / Linux-s390x (push) Waiting to run
CI / Musl-amd64 (push) Waiting to run
CI / macOS-universal (push) Waiting to run
CI / SunOS-amd64 (push) Waiting to run
CI / FreeBSD-amd64 (push) Waiting to run
CI / DragonFly-amd64 (push) Waiting to run
CI / OpenBSD-amd64 (push) Waiting to run
CI / NetBSD-amd64 (push) Waiting to run
CI / Windows-amd64 (push) Waiting to run
CI / Release (push) Blocked by required conditions
Some checks are pending
CI / spellcheck (push) Waiting to run
CI / No-features-test (push) Waiting to run
CI / Linux-amd64 (push) Waiting to run
CI / Linux-aarch64 (push) Waiting to run
CI / Linux-armv7l (push) Waiting to run
CI / Linux-armv6l (push) Waiting to run
CI / Linux-riscv64 (push) Waiting to run
CI / Linux-ppc64le (push) Waiting to run
CI / Linux-s390x (push) Waiting to run
CI / Musl-amd64 (push) Waiting to run
CI / macOS-universal (push) Waiting to run
CI / SunOS-amd64 (push) Waiting to run
CI / FreeBSD-amd64 (push) Waiting to run
CI / DragonFly-amd64 (push) Waiting to run
CI / OpenBSD-amd64 (push) Waiting to run
CI / NetBSD-amd64 (push) Waiting to run
CI / Windows-amd64 (push) Waiting to run
CI / Release (push) Blocked by required conditions
Fix #1570
This commit is contained in:
parent
d1385804bb
commit
399f262692
@ -419,8 +419,8 @@ void ffGenerateLocalIpJsonConfig(FFLocalIpOptions* options, yyjson_mut_doc* doc,
|
||||
|
||||
if (defaultOptions.showType != options->showType)
|
||||
{
|
||||
if (options->showType & FF_LOCALIP_TYPE_IPV4_BIT)
|
||||
yyjson_mut_obj_add_bool(doc, module, "showIpv4", true);
|
||||
if (!(options->showType & FF_LOCALIP_TYPE_IPV4_BIT))
|
||||
yyjson_mut_obj_add_bool(doc, module, "showIpv4", false);
|
||||
|
||||
if (options->showType & FF_LOCALIP_TYPE_IPV6_BIT)
|
||||
yyjson_mut_obj_add_bool(doc, module, "showIpv6", true);
|
||||
@ -446,8 +446,8 @@ void ffGenerateLocalIpJsonConfig(FFLocalIpOptions* options, yyjson_mut_doc* doc,
|
||||
if (options->showType & FF_LOCALIP_TYPE_COMPACT_BIT)
|
||||
yyjson_mut_obj_add_bool(doc, module, "compact", true);
|
||||
|
||||
if (options->showType & FF_LOCALIP_TYPE_DEFAULT_ROUTE_ONLY_BIT)
|
||||
yyjson_mut_obj_add_bool(doc, module, "defaultRouteOnly", true);
|
||||
if (!(options->showType & FF_LOCALIP_TYPE_DEFAULT_ROUTE_ONLY_BIT))
|
||||
yyjson_mut_obj_add_bool(doc, module, "defaultRouteOnly", false);
|
||||
|
||||
if (options->showType & FF_LOCALIP_TYPE_ALL_IPS_BIT)
|
||||
yyjson_mut_obj_add_bool(doc, module, "showAllIps", true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user