Skip to content

Commit 28cff7b

Browse files
fix: optionally subscribe to SDR events, rather than optionally creat @W-18979695@ (#1395)
* fix: optionally subscribe to SDR events, rather than optionally creating STL * chore: undo temp var
1 parent a94c413 commit 28cff7b

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

src/utils/deploy.ts

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,14 @@ export async function executeDeploy(
143143
} else {
144144
// instantiate source tracking
145145
// stl will decide, based on the org's properties, what needs to be done
146-
let stl: SourceTracking | undefined;
147-
if (!opts['dry-run'] || !(await org.tracksSource())) {
148-
stl = await SourceTracking.create({
149-
org,
150-
// mdapi format deploys don't require a project, but at this point we need one
151-
project: project ?? (await SfProject.resolve()),
152-
subscribeSDREvents: true,
153-
ignoreConflicts: opts['ignore-conflicts'],
154-
});
155-
registry = stl.registry;
156-
}
146+
const stl = await SourceTracking.create({
147+
org,
148+
// mdapi format deploys don't require a project, but at this point we need one
149+
project: project ?? (await SfProject.resolve()),
150+
subscribeSDREvents: !opts['dry-run'] || !(await org.tracksSource()),
151+
ignoreConflicts: opts['ignore-conflicts'],
152+
});
153+
registry = stl.registry;
157154

158155
componentSet = await buildComponentSet(opts, stl);
159156
if (componentSet.size === 0) {

0 commit comments

Comments
 (0)