pyinvoke / invoke

Pythonic task management & command execution.
http://pyinvoke.org
BSD 2-Clause "Simplified" License
4.41k stars 369 forks source link

Add '!join' tag to config parser #991

Open yarcod-zpt opened 7 months ago

yarcod-zpt commented 7 months ago

When dealing with, e.g., paths in a configuration file, it is not uncommon to want to perform a join operation on two values in order to keep the config file 'DRY'. By adding a !join tag to the config parser, you can join one previously defined value in the invoke.yaml file with another. For example:

base: &BASE /home/root/
app: !join [*BASE, my_app/]
settings: !join [*BASE, settings]