method
$.ShellPromise.env
env(
newEnv: undefined | Dict<string> | Record<string, undefined | string>
): this;
Set environment variables for the shell.
@param newEnv
The new environment variables
const { stdout } = await $`echo $FOO`.env({ ...process.env, FOO: "bun" });
console.log(stdout.toString()); // "bun\n"