cortesi / modd

A flexible developer tool that runs processes and responds to filesystem changes
MIT License
2.8k stars 128 forks source link

Add @confdir variable and support use in indir option #34

Closed robbles closed 5 years ago

robbles commented 8 years ago

Based on the discussion from #31, this adds support for an implicit @confdir variable which points to the directory containing the current modd.conf file.

To support using this variable in the indir option, which currently isn't templated like the commands themselves, this specific variable is replaced in the parsing step. It could also be done by using the same rendering logic that's used in varcmd on the indir option, which would allow using all variables, but that seemed too complicated for a relatively niche use case.

robbles commented 8 years ago

Looks like this doesn't handle Windows paths correctly. I'll fix that.

cortesi commented 5 years ago

Merged, with some modifications to fix cross-platform behaviour. Thanks!

robbles commented 5 years ago

@cortesi Awesome, thanks for finishing it + merging!