joerdav / xc

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

Support for multiple commands in subdirectories #1

Closed a-h closed 2 years ago

a-h commented 2 years ago

I'm trying to build something that requires changing directory.

My first attempt didn't work:

### build

Builds the project.

```sh
cd api && go build ./...
cd cdk && go build ./...

So I broke it down into two steps:

````md
### build-api

Directory: ./api

Builds the API.

```sh
go build ./...

build-cdk

Directory: ./cdk

Builds the CDK project.

go build ./...

build

Requires: build-api, build-cdk

Builds the project.


However, this produces the error:

```sh
missing command: near ### run-dynamodb-local

If I put in an empty command block, then I get:

.: 
fork/exec : no such file or directory

Suggest allowing empty commands which have "Requires" sections, or identifying where a shell expression is being used via backtick denotion of sh and using shell execute instead of locating the binary on the path.

joerdav commented 2 years ago

Fixed by f545ef6a1efa3b5b97522b4a05ac189b6f191d0d

I added support for empty tags.