netlify / cli

Netlify Command Line Interface
http://cli.netlify.com
MIT License
1.58k stars 361 forks source link

feat: implemented flag conflicts in `deploy.ts` #6909

Closed dylanspyer closed 2 days ago

dylanspyer commented 4 weeks ago

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:

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