Ed, Edd n Eddy
Ed, Edd n Eddy
DDeno
Created by Ed, Edd n Eddy on 4/28/2024 in #help
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? I'm currently spawning a long running subprocess that doesn't exit on it's own, so simply running the command, and using outputSync() probably isnt an option
16 replies
DDeno
Created by Ed, Edd n Eddy on 8/13/2023 in #help
Migrating `Deno.run` to `Deno.command` with `readlines`
I had the following:
browserProcess = Deno.run({
cmd: buildArgs, // eg chrome exe path, then options
stderr: "piped",
stdout: "piped",
});
for await (const line of readLines(browserProcess.stderr!)) {
browserProcess = Deno.run({
cmd: buildArgs, // eg chrome exe path, then options
stderr: "piped",
stdout: "piped",
});
for await (const line of readLines(browserProcess.stderr!)) {
Now i'm wondering what the best way to do this with Deno.command is?
21 replies
DDeno
Created by Ed, Edd n Eddy on 12/16/2022 in #help
Can I programatically trigger a SIGINT event?
I would like to trigger a SIGINT event from a file, is there a way to do this? For example in Node, you can do process.emit('sigint');
3 replies