On Unix and Mac machines, environmental variables can be read from .env files which have 'export' commands in them.
export USER_ENV=test export CLIENT=company
In windows, there's no such thing as the 'export' command. I therefore use the 'set' command to set the environmental variables.
set USER_ENV=test set CLIENT=company
The problem is that I have to enter each and every line individually on the command prompt.
Is there anyway I can run these 'set' commands to set the variables from a single test file?
This would save me the need to run each command individually from CMD.
I tried by entering the commands in a file setenv.txt and used the following command:
cmd < setenv.txt
That did not work as intended. I saw errors while trying to start Cypress.
How can I run these commands from a file via the CMD terminal in Windows?