Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directories in templates #2

Closed
biozz opened this issue Nov 30, 2020 · 2 comments
Closed

Directories in templates #2

biozz opened this issue Nov 30, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@biozz
Copy link

biozz commented Nov 30, 2020

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:

err := ioutil.WriteFile(destFile, []byte(content), 0755)

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!

@reddec reddec added the bug Something isn't working label Dec 1, 2020
@reddec
Copy link
Owner

reddec commented Dec 1, 2020

Thanks for the feedback! I checked - seems like a bug (some files are missed). Will fix.
Sorry for inconvenience

@reddec reddec self-assigned this Dec 1, 2020
reddec added a commit that referenced this issue Dec 1, 2020
@reddec
Copy link
Owner

reddec commented Dec 1, 2020

fixed in v0.3.6

@reddec reddec closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants