-
Notifications
You must be signed in to change notification settings - Fork 3.3k
cli: detect installing from postinstall hook #5407
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the contribution! Below are some guidelines Cypress uses when doing PR reviews.
PR Review ChecklistIf any of the following requirements can't be met, leave a comment in the review selecting 'Request changes', otherwise 'Approve'. User Experience
Functionality
Maintainability
Quality
Internal
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good and there appears to be test coverage for both the absolute path and a relative path test case for CYPRESS_CACHE_FOLDER
.
Is this a breaking change? Will this break peoples current installs that have already accommodated to the current behavior? |
@jennifer-shehane I would say its a patch fix. If the breaking change was clearly a bug it's fair for the version not to be breaking |
yeah @jennifer-shehane people who did |
User facing changelog
"Normalizes" installation when running with custom relative Cypress cache folder. For example if you want to install Cypress and cache it in the current folder, rather than in
~/.cache
export CYPRESS_CACHE_FOLDER=cache/Cypress npm i cypress npx cypress run
Additional details
Before this change, during
npm i cypress
, the installation was executed in./node_modules/cypress
folder, which is a normal NPM behavior inpostinstall
hook. But this of course is very surprising to the user who expected the relative pathCYPRESS_CACHE_FOLDER=cache/Cypress
to resolve in the current folder, and not with respect tonode_modules/cypress
.How has the user experience changed?
PR Tasks