Module

x/dax/src/command.ts>CommandBuilder#exportEnv

Cross-platform shell tools for Deno and Node.js inspired by zx.
Very Popular
Latest
method CommandBuilder.prototype.exportEnv
import { CommandBuilder } from "https://dotland.deno.dev/x/dax@0.39.2/src/command.ts";

Exports the environment of the command to the executing process.

So for example, changing the directory in a command or exporting an environment variable will actually change the environment of the executing process.

await $`cd src && export SOME_VALUE=5`;
console.log(Deno.env.get("SOME_VALUE")); // 5
console.log(Deno.cwd()); // will be in the src directory

Parameters

optional
value = [UNSUPPORTED]