invalid-stdio-file.js
This file
Path
test/fixtures/invalid-stdio-file.js
10 lines · 359 bytes · JavaScript
Last changed by
Fix an uncaught error when a file target cannot be opened and the subprocess fails to spawnSindre Sorhusbefore adoption1cee524
History of this fileTake it
1234567891011#!/usr/bin/env nodeimport {execa} from '../../index.js';
// The file cannot be opened, since its directory does not exist.// Its stream is created before the next item is rejected, which throws before spawning.try { execa('empty.js', {stdout: [{file: '/nonexistent-directory-for-execa/file'}, ['foo']]});} catch (error) { console.log(error.message);}