Closed wvh closed 5 months ago
dax doesn't support redirection and >&2
syntax, you'll have to use .stdout("piped").stderr("piped")
and extract the result and merge it manually.
It would be nice to just be able to do:
$`echo 1`.stdout(Deno.stderr)
@pomdtr that's possible nowadays.
I can imagine, I created the PR (https://github.com/dsherret/dax/pull/184).
thanks for merging it btw !
Hah! Thanks again 😄
This is fixed now in the latest release:
const result = await $`echo 1 && echo stderr >&2`.stdout("piped").stderr("piped");
console.log("stdout", result.stdout); // stdout 1\n
console.log("stderr", result.stderr); // stderr stderr\n
Hello!
This command:
throws this error:
This is not an async command, I guess the ampersand is misinterpreted as a background task operator?
Shouldn't it be possible to pass through the redirection to the shell and allow the command to write to
STDERR
this way? At least writing a simple shell script one-liner that writes toSTDERR
properly catches the output, so this is just about the initial command set-up.Thanks for your time!