Override Knope.toml file path?
Could a flag and/or environment variable be added to override the default Knope.toml filepath?
The tricky thing is deciding which directory things operate in. Right now, the command cwd and the config file are forced to be the same so I didn't have to decide how they interact 😅.
The thing that makes the most sense to me is that everything is relative to where the config file is, not where you run the command, except Git-related operations which should find the nearest parent repo. So:
versioned_filespaths are relative toknope.tomlCommands run in the same directory asknope.toml(not wherever you ranknope), that way you can also reference relative paths- Anything Git-related (collecting conventional commits, creating branches, creating tags, etc.) will use the normal Git logic to find where the root of the current Git repo is (if any) and operate there.
This solves for a case like knope --config .ci/knope.toml, but not for a use-case like knope --config ~/.knope/common-workflows.toml. Does that work for you? Or is the latter the thing you were trying to achieve?
The thing that makes the most sense to me is that everything is relative to where the config file is, not where you run the command
💯 Yes. I realize that's more complex to implement, but it certainly seems more correct to me! (It also happens to be what I need most immediately.)
a use-case like
knope --config ~/.knope/common-workflows.toml
A way to compose files may be useful, but that should probably be done with an include style feature, rather than with a path override. That should be done with...uh...care, though. 😅
Note that this could be one solution to the difficulties of multiple packages in one repo, so it's somewhat related to https://github.com/knope-dev/knope/issues/988