Skip to content

Commit

Permalink
feat: option to disable source tracking on scratch orgs (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
mshanemc authored May 16, 2023
1 parent b745dfa commit 69b616c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/testSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ export type ScratchOrgConfig = {
| 'partner-professional';
username?: string;
wait?: number;
/** true by default. Has no effect unless you set it to false */
tracksSource?: boolean;
};

export interface TestSessionOptions {
Expand Down Expand Up @@ -353,6 +355,11 @@ export class TestSession<T extends TestSessionOptions = TestSessionOptions> exte
baseCmd += ` -e ${org.edition}`;
}

// explicitly disable tracking only if set to false. True is the default on the command
if (org.tracksSource === false) {
baseCmd += ' --no-track-source';
}

const rv = shell.exec(baseCmd, this.shelljsExecOptions) as shell.ShellString;
rv.stdout = stripAnsi(rv.stdout);
rv.stderr = stripAnsi(rv.stderr);
Expand Down

0 comments on commit 69b616c

Please sign in to comment.