Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

Cross platform shell tools for Deno inspired by zx.
Very Popular
Go to Latest
method CommandBuilder.prototype.exportEnv
import { CommandBuilder } from "https://deno.land/x/dax@0.38.0/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]