mattvr
Read child process I/O
I want to write a simple Deno CLI script using
Deno.Command
or dx
that can read output from a shell utility.
For example, gum input --placeholder=\"Enter your name\"
displays a small text input, which I want to read the user input into Deno.
- If I use a Deno.Command
stdout: "inherit"
, then Deno doesn't have access to the stdout stream (containing the user name), just the file signal.
- So I tried stdout: "piped"
and piping the streams – but then the terminal hangs and displays nothing.
Does this use look right?:
3 replies
How to re-open Deno.stdin?
I'm noticing that Deno gives an error when trying to
window.prompt
after I've consumed stdin
.
When invoked:
Is it not possible to re-open Deno.stdin
for reading more than once? I notice it's closed from Deno.resources
after the initial read.
I'm doing this for a command line utility which supports I/O piping. Thanks for any help!1 replies
deno.land/x/module not using latest tag
I created a repository, at deno.land/x/shellgpt, and pushed some tags. The latest version is v0.2.0.
When I do
deno install -A --name gpt https://deno.land/x/shellgpt/mod.ts
I'd expect it to resolve to the latest, v0.2.0, but it's unexpectedly installing an older/broken version, v0.1.
This seems to be a bug in deno.land or I'm doing something wrong. I had deleted some of these earlier tags and maybe the repo is in a bugged state?5 replies