brettviren / moo

ruminants on module oriented programming
GNU General Public License v3.0
4 stars 4 forks source link

Writing output files to nonexistent directories is not supported #23

Closed brettviren closed 3 years ago

brettviren commented 3 years ago

moo should dwim with

moo compile moo.jsonnet -o /tmp/does/not/exist/moo.json 

Instead of crying:

  File "/home/bv/dev/moo/moo/__main__.py", line 235, in writeit
    with open(output, 'wb') as fp:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/does/not/exist/moo.json'
brettviren commented 3 years ago

f3c937f3bc281c44bb94a0fc751206f0f71fc642