Skip to content
This repository has been archived by the owner on Aug 22, 2023. It is now read-only.

fix: print valid flag values in error message when using exactlyOne #232

Merged
merged 2 commits into from
Feb 25, 2022
Merged

fix: print valid flag values in error message when using exactlyOne #232

merged 2 commits into from
Feb 25, 2022

Conversation

cristiand391
Copy link
Member

When a flag uses the exactlyOne flag property in one command and then you run the command without passing any flag you get a wrong error message.

sfdx force:source:deploy
ERROR running force:source:deploy:  Exactly one of the following must be provided: m,a,n,i,f,e,s,t

xorFlags: https://github.com/salesforcecli/plugin-source/blob/172fd88894f5e631655afb916f848e372acb5c8b/src/commands/force/source/deploy.ts#L26

With this fix:

sfdx force:source:deploy
ERROR running force:source:deploy:  Exactly one of the following must be provided: --manifest, --metadata, --sourcepath, --validateddeployrequestid

sfdx force:source:manifest:create
ERROR running force:source:manifest:create:  Exactly one of the following must be provided: --metadata, --sourcepath

sfdx force:mdapi:beta:deploy
ERROR running force:mdapi:beta:deploy:  Exactly one of the following must be provided: --zipfile, --validateddeployrequestid, --deploydir

@salesforce-cla
Copy link

Thanks for the contribution! It looks like @cristiand391 is an internal user so signing the CLA is not required. However, we need to confirm this.

@mdonnalley mdonnalley merged commit 7b348f8 into oclif:main Feb 25, 2022
@cristiand391 cristiand391 deleted the cd/fix-exactly-one-error branch February 25, 2022 22:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants