Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add [%]envVarName option to {{$dotenv}} #512

Closed
mchelen opened this issue Feb 6, 2020 · 4 comments
Closed

Add [%]envVarName option to {{$dotenv}} #512

mchelen opened this issue Feb 6, 2020 · 4 comments

Comments

@mchelen
Copy link

mchelen commented Feb 6, 2020

It would be great if it were possible to use an [%]envVarName option with {{dotenv}} in the same way that {{$processEnv}} [%]envVarName works. This would allow .env files to include values for multiple REST Client environments.

For example:

settings.json

  "rest-client.environmentVariables": {
    "$shared": {},
    "local": {
      "esUri": "http://localhost:9200",
      "esUser": "elastic",
      "esPass": "LOCALSECRET"
    },
    "dev": {
      "esUri": "http://dev.example.com:9201",
      "esUser": "root",
      "esPass": "DEVSECRET"
    },

.env

LOCALSECRET=changeme
DEVSECRET=ljqoie924

elasticsearch.http

### cluster health
GET {{esUri}}/_cluster/health?pretty=true
Authorization: Basic {{esUser}} {{$dotenv %esPASS}}
@Huachao
Copy link
Owner

Huachao commented Feb 24, 2020

@mchelen I have supported this and will publish this in the next release

@Huachao Huachao closed this as completed Feb 24, 2020
Huachao added a commit that referenced this issue Feb 24, 2020
@mchelen
Copy link
Author

mchelen commented Mar 3, 2020

Any chance of a new release being published soon? Really excited to have this feature available for our team!

@Huachao
Copy link
Owner

Huachao commented Mar 3, 2020

@mchelen maybe some time this week

@Huachao
Copy link
Owner

Huachao commented Mar 9, 2020

@mchelen you can try this in the latest version 0.23.2

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

No branches or pull requests

2 participants