venego
venego
DDeno
Created by venego on 8/9/2024 in #help
Hard SQL Query
No description
1 replies
DDeno
Created by venego on 1/10/2024 in #help
Can't spawn a shell properly using Deno!
const bash = (() => {
const bashProc = spawn("bash");

bashProc.stdout.on("data", (data: string) => {
console.log(`stdout: ${data}`);
});

bashProc.stderr.on("data", (err: string) => {
console.error(`stderr: ${err}`);
throw Error(err);
});

bashProc.on("close", (code: string) => {
console.log(`child process exited with code ${code}`);
});

return bashProc.stdin.write;
})();
bash('echo lll');
const bash = (() => {
const bashProc = spawn("bash");

bashProc.stdout.on("data", (data: string) => {
console.log(`stdout: ${data}`);
});

bashProc.stderr.on("data", (err: string) => {
console.error(`stderr: ${err}`);
throw Error(err);
});

bashProc.on("close", (code: string) => {
console.log(`child process exited with code ${code}`);
});

return bashProc.stdin.write;
})();
bash('echo lll');
I know there is Deno.run, but I need a way to be able to access the std outputs and errors. I'm really new to Deno, sorry if this is a dumb question.
38 replies