Creating directories that do not exist #1275
-
Is there a way to force the creation of directories when supplying an "outputFiles:" section in gomplate.yaml? If I use this myfile.gomplate.yaml file:
I get this error:
I would like to have it create the missing directory when it generates each of the outputFiles. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @theskipster - Happy New Year! Sorry for the slow response, I've been on vacation 😉 If you use |
Beta Was this translation helpful? Give feedback.
-
I'll address this in #1277! |
Beta Was this translation helpful? Give feedback.
Hi @theskipster - Happy New Year! Sorry for the slow response, I've been on vacation 😉
If you use
inputDir
/outputDir
, gomplate will create the paths, but that isn't the behaviour foroutputFiles
. I'm not sure I can think of a good reason not to automatically create the output directory, and it's a bit unexpected. I'll convert this to an issue and add this as a feature.