DenoDDeno
Powered by
Ed, Edd n EddyE
Deno•2y ago•
15 replies
Ed, Edd n Eddy

Migrating from Deno.run to Deno.command, how to readLines?

At the moment I have this:
const command = new Deno.command('...');
for await (const line of readLines(command.stderr!)) {
  // ...
  break;
}

// .. Continue using sun process
const command = new Deno.command('...');
for await (const line of readLines(command.stderr!)) {
  // ...
  break;
}

// .. Continue using sun process


How would I now do this if using
Deno.Command
Deno.Command
? I'm currently spawning a long running subprocess that doesn't exit on it's own, so simply running the command, and using
outputSync()
outputSync()
probably isnt an option
Deno banner
DenoJoin
Chat about Deno, a modern runtime for JavaScript and TypeScript.
20,944Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Migrating `Deno.run` to `Deno.command` with `readlines`
Ed, Edd n EddyEEd, Edd n Eddy / help
3y ago
Seeking help migrating from Deno.run to Deno.Command with spawn
Brandon KalinowskiBBrandon Kalinowski / help
2y ago
Migrating from Node to Deno
DuncanDDuncan / help
15mo ago
Run `nvm` using Deno.Command
bombillazoBbombillazo / help
3y ago