-
Notifications
You must be signed in to change notification settings - Fork 440
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
Create output directories if they do not exist #195
Comments
The big challenge here is that Jsonnet is currently pure C++ but the ability to create a dir requires posix / win32 / etc. |
Ah, that is a problem. I suppose as a workaround I can do something like:
Feel free to close this as will not fix if you don't think you'll end up implementing it. |
I am sort of thinking that it is really the commandline executable that would need this ability, and having that require posix (or having a chunk of functionality disabled if posix is not detected) is a lot less worse than having the libjsonnet lib (i.e. the core VM) need it. So it may not be too bad. |
ref for search to pick up on this issue: The Go jsonnet version has the flag |
If someone wants to pick this up here, feel free to open the PR. Ideally the interface would be compatible with the one in go-jsonnet. (However, if you're using Jsonnet as a command, you probably want to use go-jsonnet implementation anyway). |
I'd like to be able to invoke jsonnet like:
jsonnet -o foo/bar.json -e "{ foo: 'bar' }"
and have it create thefoo/
directory if it does not already exist. I'd like this to apply to multi-file output invocations as well. My use case is to have a file of the form:but I'd like to be able to invoke
jsonnet -m
without having to know which subdirectories to create beforehand.Currently, both invocations fail with the error:
The text was updated successfully, but these errors were encountered: