kentcdodds / cross-env

🔀 Cross platform setting of environment scripts

Home Page:https://www.npmjs.com/package/cross-env

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cross-env-shell doesn't work

JimLynchCodes opened this issue · comments

commented
  • cross-env version: 5.2.0
  • node version: 8.11.1
  • npm (or yarn) version: 5.6.0

Relevant code or config

  "scripts": {
    "set-env": "cross-env-shell NODE_ENV=development",
}

What you did:

In package.json:

Then in my shell I run node and enter process.env.NODE_ENV.

What happened:

NODE_ENV has no value.

Reproduction repository:

Problem description:

Suggested solution:

NODE_ENV should have a value...

+1

commented

@singhsoldier13 I don't think this library is meant to have the env variables still available after the current node session (and basically each node command you run is treated as a different session).

Too bad @kentcdodds is not paying attention to this project... can someone please confirm this is the correct functionality?

Too bad @kentcdodds is not paying attention to this project...

👋

I don't think this library is meant to have the env variables still available after the current node session

Yes, that's correct.

If you'd like to help monitor the issues, that'd be super.