diff --git a/src/utils/deploy.ts b/src/utils/deploy.ts index 0028bc7c..188cee18 100644 --- a/src/utils/deploy.ts +++ b/src/utils/deploy.ts @@ -143,17 +143,14 @@ export async function executeDeploy( } else { // instantiate source tracking // stl will decide, based on the org's properties, what needs to be done - let stl: SourceTracking | undefined; - if (!opts['dry-run'] || !(await org.tracksSource())) { - stl = await SourceTracking.create({ - org, - // mdapi format deploys don't require a project, but at this point we need one - project: project ?? (await SfProject.resolve()), - subscribeSDREvents: true, - ignoreConflicts: opts['ignore-conflicts'], - }); - registry = stl.registry; - } + const stl = await SourceTracking.create({ + org, + // mdapi format deploys don't require a project, but at this point we need one + project: project ?? (await SfProject.resolve()), + subscribeSDREvents: !opts['dry-run'] || !(await org.tracksSource()), + ignoreConflicts: opts['ignore-conflicts'], + }); + registry = stl.registry; componentSet = await buildComponentSet(opts, stl); if (componentSet.size === 0) {