Skip to content

🐛 Do not replace initial overrides with empty flags#497

Merged
wwilsman merged 1 commit intomasterfrom
ww/fix-percyrc-cli-overrides
Aug 13, 2021
Merged

🐛 Do not replace initial overrides with empty flags#497
wwilsman merged 1 commit intomasterfrom
ww/fix-percyrc-cli-overrides

Conversation

@wwilsman
Copy link
Copy Markdown
Contributor

What is this?

The initialOverrides value of the shared CLI #percyrc() method does not work as intended. Flags always override the initial overrides, even when the flag is undefined, resulting in desired values being removed from the resulting config object.

This PR fixes the issue by aborting the override if the flag is null or undefined. I also borrowed the set util from @percy/config to set the overridden flag using a much more tested method. An existing test was also updated to remove unnecessary set up.

@wwilsman wwilsman added the 🐛 bug Something isn't working label Aug 13, 2021
@wwilsman wwilsman requested a review from Robdel12 August 13, 2021 22:50
Copy link
Copy Markdown
Contributor

@Robdel12 Robdel12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🏁

@wwilsman wwilsman merged commit f2b9c2d into master Aug 13, 2021
@wwilsman wwilsman deleted the ww/fix-percyrc-cli-overrides branch August 13, 2021 23:05
samarsault pushed a commit that referenced this pull request Mar 3, 2023
Bumps [cypress](https://github.com/cypress-io/cypress) from 9.5.4 to 9.6.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/.releaserc.base.js)
- [Commits](cypress-io/cypress@v9.5.4...v9.6.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants