krieselreihe / litr

Litr (Language Independent Task Runner) lets you configure and then run any tasks you want for any language.
MIT License
8 stars 0 forks source link

Config resolve path extension #22

Open MartinHelmut opened 3 years ago

MartinHelmut commented 3 years ago

To enable a typical configuration pattern the search path for litr.toml (.litr.toml) could also look for inside a config folder. This would enable the following search patterns (by keeping a nested execution):

project/
  config/
    litr.toml

Besides this, there could also be the option to invoke litr by specifying a search path via environment variable, e.g.:

LITR_CONFIG_FILE=path/to/litr.toml litr build
MartinHelmut commented 3 years ago

If this will become an option, how does this affect #23 ? Also, what will be the default "current working directory" for the execution context? It can only be the parent directory, otherwise it becomes necessary to add the dir option with "../" to every single command (🙁).

A way to resolve this could be a "global" option (global options do not exist yet) like rootDir, e.g.:

# config/litr.toml
[options]
rootDir = "../"

[commands]
build = "..."