CYPRESS_INSTALL_BINARY on Windows Concats to Download URL
See original GitHub issueCurrent behavior:
On windows 10, setting CYPRESS_INSTALL_BINARY
with the following:
setx CYPRESS_INSTALL_BINARY C:/cypressBinary.3.3.1/cypress.zip /M
Then run npm install
npm install cypress@3.3.1
Produces this in the install log:
‼ Warning: Forcing a binary version different than the default.
The CLI expected to install version: 3.3.1
Instead we will install version: C:/cypressBinary.3.3.1/cypress.zip
These versions may not work properly together.
Installing Cypress (version: C:/cypressBinary.3.3.1/cypress.zip)
× Downloading Cypress → Cypress Version: 3.3.1 Unzipping Cypress Finishing Installation The Cypress App could not be downloaded.
Please check network connectivity and try again:
URL: https://download.cypress.io/desktop/C:/cypressBinary.3.3.1/cypress.zip?platform=win32&arch=x64 Error: Failed downloading the Cypress binary. Response code: 404 Response message: Not Found
Notice how the URL contains the path to the zip file.
Some more details here: https://github.com/cypress-io/cypress-documentation/issues/761#issuecomment-428059070
and a proposed solution here: https://github.com/cypress-io/cypress-documentation/issues/761#issuecomment-446140101
Desired behavior:
Setting CYPRESS_INSTALL_BINARY
on windows should install using the file located in the env variable.
Steps to reproduce: (app code and test code)
- Download the cypress zip file to
C:/cypressBinary.3.3.1/cypress.zip
- Run
setx CYPRESS_INSTALL_BINARY C:/cypressBinary.3.3.1/cypress.zip /M
- Reload command window to refresh
env
variable - Run
npm install cypress@3.3.1
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:20 (8 by maintainers)
Top GitHub Comments
Used "" instead of “/” and it worked.
i.e.: “c:\cypressBinary\cypress.zip”
I see Unix-style for Windows here:
And also here:
Also, that path in the first screenshot is wrong. It’s missing a
~
in front.