Not able to pass environment variable through CLI using plugin(index.js) #20137
Unanswered
DebashishSamanta
asked this question in
Plugins
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Windows 11 :
index.js:
module.exports = (on, config) => {
config.env.DB = {
user: process.env.DB_NAME
}
return config
}
CLI Passing the DB_NAME :
NPM Script :
"cy:chrome1": "cypress open"
CLI : npm run cy:chrome1 DB_NAME=test
But Environment Value is blank. Environment value passed from CLI is not getting stored for testing.

Beta Was this translation helpful? Give feedback.
All reactions