sudoblockio / tackle

Tackle is a programmable configuration language for building modular utilities, code generators, and CLIs with schema validation baked in.
Apache License 2.0
52 stars 2 forks source link

Fix paths in `new_source` so that all paths are consistent #175

Closed robcxyz closed 10 months ago

robcxyz commented 1 year ago

Right now we aren't consistent when a path is considered an abspath / relative when creating the source.

For instance if the target is a file, then source.file is simply the basename where as when we call a dir, it is an abspath.

This is not super important now but should be made consistent regardless of the source.

robcxyz commented 10 months ago

Needs to be fixed since reading the files is just based on source.file, not source.directory + source.file

Also makes more sense to have the source.file as full path as that is generally what people are interested in and easier to have that and then call basename on that instead of forcing concatenation with source.directory