tinted-theming / base16-builder-go

A base16 builder written in go, focused on convenience for template maintainers.
MIT License
50 stars 8 forks source link

Error whenever I run the command passing `-template-dir` #29

Open italovieira opened 6 months ago

italovieira commented 6 months ago

Whenever I run the command passing -template-dir it gives a error:

image


This error doesn't occur when I run without -template-dir: image

belak commented 6 months ago

Hello! Are the templates you're trying to build available for me to look at so I can reproduce this? My guess is that when building paths for built files should be relative to the template dir, but I may have missed that. Would that behavior make the most sense?

belak commented 6 months ago

Alright, I've taken a quick look, and it seems like I was right - this happens when using template-dir because the generated filename is assumed to be relative to the working directory, not the template-dir. When you write into a directory which doesn't exist, this will fail with the above error.

I'm not sure what the correct solution would be - would it make more sense for the output path to be relative to template-dir, or the working directory?

italovieira commented 6 months ago

I'm not sure what the correct solution would be - would it make more sense for the output path to be relative to template-dir, or the working directory?

Hello. At least for me, I was expecting it to be relative to template-dir. This would make it easy for running scripts without needing to enter the directory before.

JamyGolden commented 5 months ago

@belak tinted-builder-rust outputs relative to the template-dir, also template-dir is always a required arg so to build in the cwd you'd run tinted-builder-rust build . but the structure of the cli tool is different to builder-go.