# Incorrect environment variable value ("original value") referenced by newman

**URL:** <https://community.postman.com/t/incorrect-environment-variable-value-original-value-referenced-by-newman/15593>\
**Category:** Help Hub\
**Tags:** newman-project, variables\
**Created:** [September 3, 2020, 7:44pm UTC](https://community.postman.com/t/incorrect-environment-variable-value-original-value-referenced-by-newman/15593 "2020-09-03T19:44:16Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![cohen](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cohen](https://community.postman.com/u/cohen)\
**Post date:** [September 3, 2020, 7:44pm UTC](https://community.postman.com/t/incorrect-environment-variable-value-original-value-referenced-by-newman/15593/1 "2020-09-03T19:44:16Z")

</div>

It appears that Newman is referencing the “initial value” for environment variable values, not the “current value.” This is causing some of my tests to break.

I’ll set the “initial value” to match the “current value” and that will fix the problem temporarily, but then it seems like after a day or so the “initial value” will reset and the tests will break again.

Does anyone know how to resolve this?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 3, 2020, 9:29pm UTC](https://community.postman.com/t/incorrect-environment-variable-value-original-value-referenced-by-newman/15593/2 "2020-09-03T21:29:27Z")

</div>

Hey @cohen

How are you referencing that environment file in the Newman run command?

---

<div class="post-metadata">

**Author:** ![cohen](https://avatars.discourse-cdn.com/v4/letter/c/b9bd4f/32.png) [@cohen](https://community.postman.com/u/cohen)\
**Post date:** [September 4, 2020, 1:07am UTC](https://community.postman.com/t/incorrect-environment-variable-value-original-value-referenced-by-newman/15593/3 "2020-09-04T01:07:53Z")

</div>

Hey @danny-dainton, I grab the environment with the -e option. The command looks like this:

```
$ newman run "https://api.getpostman.com/collections/<collection_id>?apikey=<api_key>" -e "https://api.getpostman.com/environments/<environment_id>?apikey=<api_key>"
```

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [September 4, 2020, 5:47am UTC](https://community.postman.com/t/incorrect-environment-variable-value-original-value-referenced-by-newman/15593/4 "2020-09-04T05:47:12Z")

</div>

Anything you have as the _current_ value in the app, is not sync’d to the Postman servers.

It would work fine in the app as that’s you’re current session. If you were to add only a current value and exported that environment as a JSON file, the value would be there either.

You would need to have a value in the initial value for Postman to know what it is and make that available in the environment URL.

What you could do with Newman is to pass the value for an environment in the CLI command.

```auto
--env-var "var_name=var_value"

```

Be doing this, it will resolve the `{{var_name}}` variable in the collection. This is perfect for sensitive data like passwords and API Keys that you don’t what to sync with the Postman servers.
