Newman: Provide flag to override environment variables as key=value (some sort of "--env-var" flag)

Created on 28 Nov 2018  路  2Comments  路  Source: postmanlabs/newman

This is now possible with the --global-var key=value option.
This is not exactly in line with feature request - in our case we are building CI/CD pipeline and have environment json file from developers. So, we need to provide env.json file and override some of the variables by using some "env-var" flag. Also, it could work if newman could recognize data variables from CLI.

Approach with global variables will not work because env variables have higher priority than globals - variables in Postman.

Sure, we can read existing env file, parse them, override variables and save, but this is a huge workaround that could be eliminated in case newman will have some functionality as Postman.

_Originally posted by @dkutetsky in https://github.com/postmanlabs/newman/issues/764#issuecomment-442411756_

Most helpful comment

I can see that the code change has been merged, any idea of when this will be released?

All 2 comments

I can see that the code change has been merged, any idea of when this will be released?

@dkutetsky @ADringer The --env-var option has been added in Newman v4.4.0.

Was this page helpful?
0 / 5 - 0 ratings