You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the "Downsides" section for CLI it states: "No support for nested fields",
however I DO can pass nested fields from the CLI --env parameter by using JSON string values:
The cypress docs for --env param shows the use of JSON parameters.
And tested by me in Cypress v13.6.3, example from package.json scripts:
"cy:open": "cypress open --env \"{\\\"conf1\\\":\\\"val 1,2\\\", \\\"nested\\\":{\\\"subProp\\\":true}}\"",
or as a simple command: cypress open --env '{"conf1":"val 1,2", "nested": { "subProp": true } }'
Also by using JSON I can pass special characters within string values like single/double quotes and spaces.
Should the guide be updated to document the JSON values and state that nested fields are supported?
The text was updated successfully, but these errors were encountered:
Subject
Guides
Description
In this guide:
https://docs.cypress.io/guides/guides/environment-variables#Option-4---env
In the "Downsides" section for CLI it states: "No support for nested fields",
however I DO can pass nested fields from the CLI --env parameter by using JSON string values:
The cypress docs for
--env
param shows the use of JSON parameters.And tested by me in Cypress v13.6.3, example from package.json scripts:
or as a simple command:
cypress open --env '{"conf1":"val 1,2", "nested": { "subProp": true } }'
Also by using JSON I can pass special characters within string values like single/double quotes and spaces.
Should the guide be updated to document the JSON values and state that nested fields are supported?
The text was updated successfully, but these errors were encountered: