Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/denoexec/lib/functional.ts

A higher level wrapper around https://doc.deno.land/builtin/stable#Deno.run
Latest
import * as denoexec from "https://deno.land/x/denoexec@v1.1.5/lib/functional.ts";

Functions

f
_

_ is a short cut for exec({ cmds: [...args] }).

f
$

$ emulates a sub shell, essentially it sets inheritStdio to false & captureStdio to true and then returns the result of stdioCombined().

If set to true, the default; then output from STDOUT & STDERR will be captured into buffers for later use.

Set a custom current working directory for the child process.

Set a custom environment for the child process.

If set to true, the default; then output from STDOUT & STDERR will be copied on to the Writers set by stdout & stderr.

If inheritStdio=true & a value is provided here, each line of output will be prefixed with this value.

If prefix is set then this will be suffixed on to the prefix. Defaults to |.

Provide an alternative Writer for the STDERR stream.

Send data to the child process via the STDIN stream.

Provide an alternative Writer for the STDOUT stream.

If set to true then a NonZeroExitCode error will be thrown when the process exists with a non-zero exit code.

If set to true then a NonEmptyStderrBuffer error will be thrown when the stderr buffer contains data.