2 ms·
On node 16.9 console.log doesn't produce a non-zero exit code, but process.stdout.write does, and gives me a decent error message as well: internal/fs/utils.
by ksbrooksjr 5y ago
On node 16.9 console.log doesn't produce a non-zero exit code, but process.stdout.write does, and gives me a decent error message as well:
internal/fs/utils.js:332
throw err;
^
Error: ENOSPC: no space left on device, write
at writeSync (fs.js:736:3)
- terinjokes 5y agoThis is because console.log isn't the equivalent to the post's printf. It is purposefully opaque to the application (and applications should not assume anything happens with the input).[0] > Its main output is the implementation-defined side effect of printing the result to the console. [0]: https://console.spec.whatwg.org/#logger https://console.spec.whatwg.org/#logger