kopia lustrzana https://github.com/simonw/datasette
Get "$file": "../path" mechanism working again, closes #839
rodzic
793a52b317
commit
9ae0d483ea
|
@ -911,6 +911,8 @@ def resolve_env_secrets(config, environ):
|
|||
if isinstance(config, dict):
|
||||
if list(config.keys()) == ["$env"]:
|
||||
return environ.get(list(config.values())[0])
|
||||
elif list(config.keys()) == ["$file"]:
|
||||
return open(list(config.values())[0]).read()
|
||||
else:
|
||||
return {
|
||||
key: resolve_env_secrets(value, environ)
|
||||
|
|
Ładowanie…
Reference in New Issue