DanielXMoore / Civet

A TypeScript superset that favors more types and less typing
https://civet.dev
MIT License
1.33k stars 28 forks source link

`-o dist/.js` errors if the `dist` folder doesn't already exist #1253

Closed bbrk24 closed 1 month ago

edemaine commented 1 month ago

What operating system? It seems to work on Windows.

bbrk24 commented 1 month ago

Ubuntu 22.04 via WSL. I'll note that I wasn't able to reproduce it if I added civet to my path, I had to call it via npx.

$ npx civet --js -c src/*.civet -o dist/.js
dist/Card.js failed to write:
Error: ENOENT: no such file or directory, open 'dist/Card.js'
    at async open (node:internal/fs/promises:636:25)
    at async Object.writeFile (node:internal/fs/promises:1216:14)
    at async cli (/home/bbrk24/workspace/NewSolitaire/node_modules/@danielx/civet/dist/civet:538:11) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'open',
  path: 'dist/Card.js'
}