mc-image-helper
mc-image-helper copied to clipboard
Support default values in environment variable interpolation
It would be nice if were were able to set default values in config variables, to be able to be overrided.
For this, I'd propose something similar to Shell Parameter Exansion, so for example
database:
host: ${CFG_DATABASE_HOST:-mariadb}
database: ${CFG_DATABASE_DATABASE:-minecraft}
password: ${CFG_DATABASE_PASSWORD}
with env vars set of
CFG_DATABASE_HOST=mysql
CFG_DATABASE_PASSWORD=letmein
would result in
database:
host: mysql
database: minecraft
password: letmein
That's a great suggestion. I'll get that queued up.