Skip to content

Commit

Permalink
fix: fixes exclusive flags for mdapi/source:deploy when using quickde…
Browse files Browse the repository at this point in the history
…ploy (#521)

Co-authored-by: smitdagli05 <[email protected]>
  • Loading branch information
WillieRuemmele and smitdagli05 authored Jul 20, 2022
1 parent 7cec7b1 commit 7c52a05
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/commands/force/mdapi/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
2 changes: 1 addition & 1 deletion src/commands/force/source/deploy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
11 changes: 7 additions & 4 deletions test/nuts/mdapi.nut.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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,
}
);
});
});
});
Expand Down

0 comments on commit 7c52a05

Please sign in to comment.