From 7c52a05c91484dd1135b6b7498c4e89718092256 Mon Sep 17 00:00:00 2001 From: Willie Ruemmele Date: Wed, 20 Jul 2022 15:30:19 -0600 Subject: [PATCH] fix: fixes exclusive flags for mdapi/source:deploy when using quickdeploy (#521) Co-authored-by: smitdagli05 <67739894+smitdagli05@users.noreply.github.com> --- src/commands/force/mdapi/deploy.ts | 2 +- src/commands/force/source/deploy.ts | 2 +- test/nuts/mdapi.nut.ts | 11 +++++++---- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/commands/force/mdapi/deploy.ts b/src/commands/force/mdapi/deploy.ts index 8b4c0a4ed..c0015c79a 100644 --- a/src/commands/force/mdapi/deploy.ts +++ b/src/commands/force/mdapi/deploy.ts @@ -73,7 +73,7 @@ export class Deploy extends DeployCommand { description: messages.getMessage('flags.validatedDeployRequestId'), longDescription: messages.getMessage('flagsLong.validatedDeployRequestId'), exactlyOne: xorFlags, - exclusive: ['testlevel', 'runtests', 'ignoreerrors', 'ignorewarnings', 'checkonly'], + exclusive: ['testlevel', 'runtests', 'checkonly'], validate: DeployCommand.isValidDeployId, }), verbose: flags.builtin({ diff --git a/src/commands/force/source/deploy.ts b/src/commands/force/source/deploy.ts index befef6af5..ef4067c55 100644 --- a/src/commands/force/source/deploy.ts +++ b/src/commands/force/source/deploy.ts @@ -80,7 +80,7 @@ export class Deploy extends DeployCommand { description: messages.getMessage('flags.validateDeployRequestId'), longDescription: messages.getMessage('flagsLong.validateDeployRequestId'), exactlyOne: xorFlags, - exclusive: ['checkonly', 'testlevel', 'runtests', 'ignoreerrors', 'ignorewarnings', 'tracksource'], + exclusive: ['checkonly', 'testlevel', 'runtests', 'tracksource'], validate: DeployCommand.isValidDeployId, }), verbose: flags.builtin({ diff --git a/test/nuts/mdapi.nut.ts b/test/nuts/mdapi.nut.ts index 21a33c993..62a821637 100644 --- a/test/nuts/mdapi.nut.ts +++ b/test/nuts/mdapi.nut.ts @@ -10,7 +10,7 @@ import * as path from 'path'; import { exec } from 'shelljs'; import { expect } from 'chai'; import { execCmd, SfdxExecCmdResult, TestSession } from '@salesforce/cli-plugins-testkit'; -import { ComponentSet, SourceComponent, RequestStatus } from '@salesforce/source-deploy-retrieve'; +import { ComponentSet, RequestStatus, SourceComponent } from '@salesforce/source-deploy-retrieve'; import { DescribeMetadataResult } from 'jsforce/api/metadata'; import { create as createArchive } from 'archiver'; import { RetrieveCommandAsyncResult, RetrieveCommandResult } from 'src/formatters/mdapi/retrieveResultFormatter'; @@ -565,9 +565,12 @@ describe('mdapi NUTs', () => { ).jsonOutput.result; }); it('should deploy validated Id', () => { - execCmd(`force:mdapi:deploy --wait -1 --validateddeployrequestid ${deployCommandResponse.id}`, { - ensureExitCode: 0, - }); + execCmd( + `force:mdapi:deploy --wait -1 --validateddeployrequestid ${deployCommandResponse.id} --ignorewarnings --ignoreerrors`, + { + ensureExitCode: 0, + } + ); }); }); });