Skip to content

process.env gets auto-forwarded #156

Closed

Description

@Andarist

tinyexec/src/env.ts

Lines 57 to 65 in 8a4ccde

export function computeEnv(
cwd: string,
env?: EnvLike,
nodePath: boolean = true
): EnvLike {
const envWithDefault = {
...process.env,
...env
};

This is surprising and different from the spawn behavior. It's also not quite what we always want given it's common for API keys and secrets to be available in the process.env.

Activity

  1. 43081j commented on Jul 14, 2026

    @43081j
    Member

    its to cover the common use case. most users do indeed want to inherit the process env because thats how npm scripts and such work.

    we have to be very careful introducing new options though so this needs some thought. as its a slippery slope to being just as bloated as the alternatives.

    an inheritEnv or something may work but i think i need to ponder on it for a bit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions