Skip to content

Don't rely on presence of process.env.Path to detect windows #34

Description

@mkmik

I noticed I couldn't install many npm packages because of:

npm ERR! not found: git

Digging deeper I noticed it's because of:

var pathEnv = opt.path || process.env.Path || process.env.PATH || ''

I have an env var on linux called Path (because it's needed by wine), so that is what gets split
I guess it would be better to check for the env var appropriate for the detected OS instead.

Activity

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