Skip to content

Commit

Permalink
Get "$file": "../path" mechanism working again, closes #839
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Jun 12, 2020
1 parent 793a52b commit 9ae0d48
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions datasette/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 9ae0d48

Please sign in to comment.