joerdav / xc

Markdown defined task runner.
https://xcfile.dev/
MIT License
1.16k stars 27 forks source link

Run tasks defined in a parent directory. #8

Closed joerdav closed 1 year ago

joerdav commented 2 years ago

Is your feature request related to a problem? Please describe. When in a sub-directory of a project that has an xc file defined at the root, you can't run tasks defined said xc file.

Describe the solution you'd like When running xc in a folder that does not contain a README.md with tasks definied, search in parent directories.

Describe alternatives you've considered An alternative is to just keep as-is, to prevent (potentially) unexpected behaviour.

a-h commented 1 year ago

I run into this all the time. Heading up the directory tree until you find a .git file or the root directory would be useful.

joerdav commented 1 year ago

Agreed. The only reason I hadn't yet implemented this was because I wasn't sure if there is any sort of security considerations to scanning parent directories.

I could be being overly cautious! But didn't think other task runners did this either, maybe there is a reason!

joerdav commented 1 year ago

A quick bit of research, and I stand corrected! I'll take a look at this at some point, since it's an issue I hit sometimes.

joerdav commented 1 year ago

Tagged in v0.0.159