Skip to content
This repository has been archived by the owner on Mar 18, 2024. It is now read-only.

Commit

Permalink
refactor(install-package): fix for readability in artifact installati…
Browse files Browse the repository at this point in the history
…on setter
  • Loading branch information
azlam-abdulsalam committed Mar 28, 2022
1 parent a88923a commit 54b2ef1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions packages/core/src/package/packageInstallers/InstallPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export abstract class InstallPackage {
protected packageDescriptor;
protected packageDirectory;
protected org: SFPOrg;
private isArtifactToBeCommitted: boolean = true;
private _isArtifactToBeCommittedInOrg: boolean = true;

public constructor(
protected sfdxPackage: string,
Expand Down Expand Up @@ -141,12 +141,12 @@ export abstract class InstallPackage {
}

//Set this to disable whethere info about the artifact has to be recorded in the org
public set disableArtifactCommit(disableArtifactCommit: boolean) {
this.isArtifactToBeCommitted = !disableArtifactCommit;
public set isArtifactToBeCommittedInOrg(toCommit: boolean) {
this._isArtifactToBeCommittedInOrg = toCommit;
}

private async commitPackageInstallationStatus() {
if (this.isArtifactToBeCommitted) {
if (this._isArtifactToBeCommittedInOrg) {
try {
await this.org.updateArtifactInOrg(this.logger, this.packageMetadata);
} catch (error) {
Expand Down
6 changes: 3 additions & 3 deletions packages/sfpowerscripts-cli/src/impl/deploy/DeployImpl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ export default class DeployImpl {
this.props.packageLogger,
this.props.isDryRun
);
installUnlockedPackageImpl.disableArtifactCommit = this.props.disableArtifactCommit;
installUnlockedPackageImpl.isArtifactToBeCommittedInOrg = !this.props.disableArtifactCommit;
return installUnlockedPackageImpl.exec();
}

Expand Down Expand Up @@ -658,7 +658,7 @@ export default class DeployImpl {
: DeploymentType.MDAPI_DEPLOY,
this.props.isDryRun
);
installSourcePackageImpl.disableArtifactCommit = this.props.disableArtifactCommit;
installSourcePackageImpl.isArtifactToBeCommittedInOrg = !this.props.disableArtifactCommit;
return installSourcePackageImpl.exec();
}

Expand All @@ -679,7 +679,7 @@ export default class DeployImpl {
LoggerLevel.INFO,
this.props.isDryRun
);
installDataPackageImpl.disableArtifactCommit = this.props.disableArtifactCommit;
installDataPackageImpl.isArtifactToBeCommittedInOrg = !this.props.disableArtifactCommit;
return installDataPackageImpl.exec();
}

Expand Down

0 comments on commit 54b2ef1

Please sign in to comment.