mirror of
https://github.com/iv-org/invidious.git
synced 2025-09-15 16:28:30 +00:00
Mark attributes set over env var as present if needed
This commit is contained in:
parent
f978c2b228
commit
245ffc8396
@ -285,6 +285,12 @@ class Config
|
|||||||
begin
|
begin
|
||||||
config.{{ivar.id}} = ivar_type.from_yaml(env_value)
|
config.{{ivar.id}} = ivar_type.from_yaml(env_value)
|
||||||
success = true
|
success = true
|
||||||
|
|
||||||
|
# Update associated _present key if any
|
||||||
|
{% other_ivar = @type.instance_vars.find { |other_ivar| other_ivar.name == ivar.name + "_present" } %}
|
||||||
|
{% if other_ivar && (ann = other_ivar.annotation(YAML::Field)) && ann[:ignore] == true %}
|
||||||
|
config.{{other_ivar.name.id}} = true
|
||||||
|
{% end %}
|
||||||
rescue
|
rescue
|
||||||
# nop
|
# nop
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user