Skip to content

Commit b4f5638

Browse files
committed
fix: license-type should not be needed when cloning a sandbox
@W-12587837@
1 parent e5b941a commit b4f5638

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/commands/org/create/sandbox.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,14 @@ export default class CreateSandbox extends SandboxCommandBase<SandboxProcessObje
136136

137137
private async createSandboxRequest(): Promise<SandboxRequest> {
138138
// reuse the existing sandbox request generator, with this command's flags as the varargs
139-
const { sandboxReq } = await createSandboxRequest(false, this.flags['definition-file'], undefined, {
139+
const requestOptions = {
140140
...(this.flags.name ? { SandboxName: this.flags.name } : {}),
141+
...(this.flags.clone ? { SourceSandboxName: this.flags.clone } : {}),
141142
...(!this.flags.clone && this.flags['license-type'] ? { LicenseType: this.flags['license-type'] } : {}),
142-
});
143+
};
144+
const { sandboxReq } = this.flags.clone
145+
? await createSandboxRequest(true, this.flags['definition-file'], undefined, requestOptions)
146+
: await createSandboxRequest(false, this.flags['definition-file'], undefined, requestOptions);
143147
return {
144148
...sandboxReq,
145149
...(this.flags.clone ? { SourceId: await this.getSourceId() } : {}),

src/commands/org/resume/scratch.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ export default class EnvResumeScratch extends SfCommand<ScratchCreateResponse> {
3030
public static readonly flags = {
3131
'job-id': Flags.salesforceId({
3232
char: 'i',
33+
length: 'both',
3334
summary: messages.getMessage('flags.job-id.summary'),
3435
description: messages.getMessage('flags.job-id.description'),
3536
exactlyOne: ['use-most-recent', 'job-id'],

0 commit comments

Comments
 (0)