Hadron / carthage

Carthage is an Infrastructure as Code (IAC) framework
Other
7 stars 4 forks source link

mako_task writes to local filesystem if output= starts with '/' #67

Open kdienes opened 2 months ago

kdienes commented 2 months ago

This feels unintuitive

hartmans commented 2 months ago

"Klee" == Klee Dienes @.***> writes:

Klee> This feels unintuitive

Yeah, we ran into a similar situation with different code and created carthage.utils.relative_path.

In the mako path, we skip the install and print a warning if the output path is absolute. You could use mako_task independent of install_mako_task, and I think in that usage non-relative output would write absolute paths probably makes sense. In other words, if the only consumer of mako_task is going to be MachineModel and Machine, we can insert a call to relative_path around output. But if you are going to use mako_task in arbitrary SetupTaskMixins, might you want to write to an absolute path?

Thoughts?