Skip to content
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

feat: implemented flag conflicts in deploy.ts #6909

Merged
merged 4 commits into from
Nov 27, 2024

Conversation

dylanspyer
Copy link
Contributor

Implemented feature from commander to prevent
mutually exclusive flags from being run in the same command.

🎉 Thanks for submitting a pull request! 🎉

Summary

Fixes #3978

Before the change to commander, the CLI used oclif for defining commands and specifying flags. oclif allowed for mutually exclusive flags when running commands—for example, when running deploy with --prod, the user shouldn't also be able to use --prodIfUnlocked. Initially, commander did not allow for mutually exclusive flags, but later implemented support for it. This PR re-implements the feature as it existed prior to moving to commander. We identified the conflicting flags by pulling in a commit that is chronologically prior to the issue this PR addresses.


For us to review and ship your PR efficiently, please perform the following steps:

  • Open a bug/issue before writing your code 🧑‍💻. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire 🔥 (e.g. incident related), you can skip this step.
  • Read the contribution guidelines 📖. This ensures your code follows our style guide and
    passes our tests.
  • Update or add tests (if any source code was changed or added) 🧪
  • Update or add documentation (if features were changed or added) 📝
  • Make sure the status checks below are successful ✅

A picture of a cute animal (not mandatory, but encouraged)
image

Implemented feature from `commander` to prevent
mutually exclusive flags from being run in the same
command.

Co-authored-by: Ben Hancock <[email protected]>
@dylanspyer dylanspyer requested a review from a team as a code owner October 31, 2024 15:45
@sarahetter sarahetter enabled auto-merge (squash) November 26, 2024 23:17
@sarahetter sarahetter merged commit 4e668f2 into netlify:main Nov 27, 2024
48 of 49 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat: support exclusive/conflicting options
3 participants