You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ ../jsonnet folder/input.jsonnet
terminate called after throwing an instance of 'std::ios_base::failure'
what(): basic_filebuf::underflow error reading the file Aborted
The text was updated successfully, but these errors were encountered:
Good catch. I'm adding explicit checks for importing the empty strings and directories. But you can still import "." which I can't detect is a directory in standard C++. So I'll just turn the IO error into a Jsonnet runtime error:
$ jsonnet -e 'import ""'
RUNTIME ERROR: Couldn't open import "": The empty string is not a valid filename
:1:1-9
$ jsonnet -e 'import "."'
RUNTIME ERROR: Couldn't open import ".": basic_filebuf::underflow error reading the file
:1:1-10
$ jsonnet -e 'import "/"'
RUNTIME ERROR: Couldn't open import "/": Attempted to import a directory
:1:1-10
$ ls folder
input.jsonnet
$ cat folder/input.jsonnet
$ ../jsonnet folder/input.jsonnet
terminate called after throwing an instance of 'std::ios_base::failure'
what(): basic_filebuf::underflow error reading the file
Aborted
The text was updated successfully, but these errors were encountered: