I am using latest docker image of trusted-cgi and was not able to create a lambda from Nim template with an error saying:
Error: -30000: create lambda: write file src/lambda.nim content: open /data/b37de1ee-1e86-4209-b817-7ecb321d696f/src/lambda.nim: no such file or directory
Nim template is the only one that has directory in the template definition - src/lambda.nim. So I then went through the sources and discovered, that files are created with WriteFile:
But WriteFile can't handle directories. It should be possible to parse file path and do something like MkdirAll with it. What do you think?
PS: I am not a Nim developer and have just discovered trusted-cgi a couple of days ago; you have done an amazing job, thank you for that simple and straightforward solution!
I am using latest docker image of trusted-cgi and was not able to create a lambda from Nim template with an error saying:
Nim template is the only one that has directory in the template definition -
src/lambda.nim
. So I then went through the sources and discovered, that files are created withWriteFile
:https://github.com/reddec/trusted-cgi/blob/31a0a060d0ee3dcf2274286aa0fcc443667995e4/application/lambda/initializer.go#L56
But
WriteFile
can't handle directories. It should be possible to parse file path and do something likeMkdirAll
with it. What do you think?PS: I am not a Nim developer and have just discovered trusted-cgi a couple of days ago; you have done an amazing job, thank you for that simple and straightforward solution!