# Env\_var\_name in Orb with local build

**URL:** <https://discuss.circleci.com/t/env-var-name-in-orb-with-local-build/33185>\
**Category:** Orbs\
**Created:** [November 4, 2019, 3:34pm UTC](https://discuss.circleci.com/t/env-var-name-in-orb-with-local-build/33185 "2019-11-04T15:34:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhamail](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/bhamail/32/23556_2.png) [@bhamail](https://discuss.circleci.com/u/bhamail)\
**Post date:** [November 4, 2019, 3:34pm UTC](https://discuss.circleci.com/t/env-var-name-in-orb-with-local-build/33185/1 "2019-11-04T15:34:41Z")

</div>

I’m trying to convert some existing variables to use a `env_var_name` parameter. The problem I’m running into is I can’t figure out how to run a local build and get the env\_var\_name parameter to have a “real” value (other than that define by the “default” field) during the local build.

For example, given an Orb that defines a parameter like this:

```
  parameters:
    myEnvVar:
      type: env_var_name
      default: MY_ENV_VAR

```

My workflow (for better of worse) is:

1. Process my inline Orb into a “local” compatible config. Like:

2. Run the `local-config` via a shell script that provide values for the command line via the `-e` parameter. Like this:

When the local build executes, the value found in the parameter myEnvVar (via: \<\< parameters. myEnvVar \>\> ) is always just the “default” variable name (MY\_ENV\_VAR). My goal is to make the local build see the value “someRealValue”. Is this possible? Thanks!

---

<div class="post-metadata">

**Author:** ![KyleTryon](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/kyletryon/32/9977_2.png) [@KyleTryon](https://discuss.circleci.com/u/KyleTryon)\
**Post date:** [November 6, 2019, 2:41pm UTC](https://discuss.circleci.com/t/env-var-name-in-orb-with-local-build/33185/2 "2019-11-06T14:41:16Z")

</div>

Hello @bhamail,

In order to use 2.1 config locally at the moment, you must first pre-process the config file into a standard 2.0 file.

`circleci config process <path>` this will produce a file that should work with your local cli run.

Please let us know if you run into any issues. Thank you!

---

<div class="post-metadata">

**Author:** ![bhamail](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/bhamail/32/23556_2.png) [@bhamail](https://discuss.circleci.com/u/bhamail)\
**Post date:** [November 6, 2019, 3:06pm UTC](https://discuss.circleci.com/t/env-var-name-in-orb-with-local-build/33185/3 "2019-11-06T15:06:07Z")

</div>

Hi Kyle,

Thanks for the reply, but I believe my example shows I’m already processing the file into a 2.0 format. (see above).

```
circleci config process .circleci/config.yml > .circleci/local-config.yml
circleci local execute -c .circleci/local-config.yml --job 'build' -e MY_ENV_VAR=someRealValue

```

Running the resulting 2.0 config (.circleci/local-config.yml) is not populate the env\_var\_name parameter with the desired value (“someRealValue”). Am I missing something?

---

<div class="post-metadata">

**Author:** ![bhamail](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/bhamail/32/23556_2.png) [@bhamail](https://discuss.circleci.com/u/bhamail)\
**Post date:** [April 15, 2020, 8:04pm UTC](https://discuss.circleci.com/t/env-var-name-in-orb-with-local-build/33185/4 "2020-04-15T20:04:01Z")

</div>

> [@bhamail](#):
>
> type: env\_var\_name

Ping! Any word on how to use `type: env_var_name` in a local build? A reply of “Definitely not possible” will save me time trying to find a solution. 🙂
