knope
knope copied to clipboard
Detect knope.toml in parent directories
I'd like to be able to run dobby without having to be in the exact directory containing the dobby.toml. I may make the last git commit from a child directory, and it would smooth out the workflow to not need to cd.
A couple thoughts:
- This will include some sort of procdeural check through every parent directory
- We may want to stop searching after checking the root of the current git repository (
git rev-parse --show-toplevel). - What about git submodules where the submodule does not have a
dobby.tomlbut the parent repo does? - Should there be support for a global dobby.toml, e.g. at
~/.dobby.tomlor~/.config/dobby/dobby.toml? I don't see a need for it, but I am sure someone will come up with something. - Related to the previous one: can settings cascade? Does it make sense for them to do so?
I'm looking into this and taking an initially naïve approach of recursively checking all parent directories until a knope.toml file is found. I think some of the questions/thoughts in the initial suggestion can be added later as an additional feature.
My questions with the above in mind;
- Do we want to run the workflow commands from the same directory as the found
knope.tomlor from the current directory? - If there's appetite to support both, I assume we'll need some kind've configuration for the
Commandworkflow step to be able to switch between the two, or perhaps a CLI argument to switch between the default and non-default option?