Writing to stdin of a running Process using @effect/platform CommandExecutor

How to continuously pipe to stdin of a running Process?

In Node.js, we can simply do:

import { spawn } from 'node:child_process';
const ls = spawn('ls', ['-lh', '/usr']);
ls.stdin.write('WRITE DATA')


But I can't figure out how to do it using @effect/platform/CommandExecutor's Process implementation.

stdin is a Sink<void, Uint8Array, never, PlatformError, never>, but idk how to write to a
Sink
without having access to the underlying
Stream
??
Was this page helpful?