Skip to content
Myr

nested-multiple-stdin.js

This file

Path

test/fixtures/nested-multiple-stdin.js

9 lines · 300 bytes · JavaScript

Last changed by

Allow `stdin`/`stdout`/`stderr` to be an array (#643)ehmickybefore adoption7efd50c

History of this file

Take it

Allow `stdin`/`stdout`/`stderr` to be an array (#643)ehmickybefore adoption7efd50c

lines 1–9why, one step back
1#!/usr/bin/env node
2import process from 'node:process';3import {execa} from '../../index.js';45const [options] = process.argv.slice(2);6const childProcess = execa('stdin.js', {stdin: JSON.parse(options)});7childProcess.stdin.write('foobar');8const {stdout} = await childProcess;9console.log(stdout);