1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Add function description

Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
Sebastian Malton 2022-11-04 09:23:51 -04:00
parent fb196f376b
commit 3853f19fd5

View File

@ -19,6 +19,11 @@ export interface UnixShellEnvOptions {
export type ComputeUnixShellEnvironment = (shell: string, opts: UnixShellEnvOptions) => Promise<AsyncResult<EnvironmentVariables, string>>;
/**
* @param src The object containing the current environment variables
* @param overrides The environment variables that want to be overridden before passing the env to a child process
* @returns The combination of environment variables and a function which resets an object of environment variables to the values the keys corresponded to in `src` (rather than `overrides`)
*/
const getResetProcessEnv = (src: Partial<Record<string, string>>, overrides: Partial<Record<string, string>>): {
resetEnvPairs: (target: Partial<Record<string, string>>) => void;
env: Partial<Record<string, string>>;