Menv
Bun

method

$.ShellPromise.env

newEnv: undefined | Record<string, string>
): this;

Set environment variables for the shell.

@param newEnv

The new environment variables

await $`echo $FOO`.env({ ...process.env, FOO: "LOL!" })
expect(stdout.toString()).toBe("LOL!");