diff --git a/packages/core/src/package/packageInstallers/InstallUnlockedPackageCollection.ts b/packages/core/src/package/packageInstallers/InstallUnlockedPackageCollection.ts index 9eae8012c..5f99a2723 100644 --- a/packages/core/src/package/packageInstallers/InstallUnlockedPackageCollection.ts +++ b/packages/core/src/package/packageInstallers/InstallUnlockedPackageCollection.ts @@ -8,7 +8,7 @@ import { EOL } from 'os'; export default class InstallUnlockedPackageCollection { private installedPackages: Package2Detail[]; - constructor(private sfpOrg: SFPOrg, private logger: Logger) {} + constructor(private sfpOrg: SFPOrg, private logger: Logger,private dryRun:boolean=false) {} public async install( package2s: Package2Detail[], @@ -38,7 +38,8 @@ export default class InstallUnlockedPackageCollection { ); if (package2.key) installUnlockedPackageImpl.setInstallationKey(package2.key); try { - await installUnlockedPackageImpl.install(); + if(!this.dryRun) + await installUnlockedPackageImpl.install(); } catch (error) { let message: string = error.message; if ( diff --git a/packages/sfpowerscripts-cli/src/impl/release/ReleaseImpl.ts b/packages/sfpowerscripts-cli/src/impl/release/ReleaseImpl.ts index d8a5f1f43..bb1f1cdfb 100644 --- a/packages/sfpowerscripts-cli/src/impl/release/ReleaseImpl.ts +++ b/packages/sfpowerscripts-cli/src/impl/release/ReleaseImpl.ts @@ -277,7 +277,7 @@ export default class ReleaseImpl { externalPackage2s.push(dependendentPackage); } let sfpOrg = await SFPOrg.create({ aliasOrUsername: targetOrg }); - let packageCollectionInstaller = new InstallUnlockedPackageCollection(sfpOrg, new ConsoleLogger()); + let packageCollectionInstaller = new InstallUnlockedPackageCollection(sfpOrg, new ConsoleLogger(),this.props.isDryRun); await packageCollectionInstaller.install(externalPackage2s, true, true); groupSection.end();