Skip to content

Commit 848b90f

Browse files
committed
fix: only instantiate stl when non mdapi deploys
1 parent ba1947c commit 848b90f

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/utils/deploy.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,6 @@ export async function executeDeploy(
124124

125125
const org = await Org.create({ aliasOrUsername: opts['target-org'] });
126126
const usernameOrConnection = org.getConnection();
127-
// instantiate source tracking
128-
// stl will decide, based on the org's properties, what needs to be done
129-
const stl = await SourceTracking.create({
130-
org,
131-
project,
132-
subscribeSDREvents: true,
133-
ignoreConflicts: opts['ignore-conflicts'],
134-
});
135127

136128
if (opts['metadata-dir']) {
137129
if (id) {
@@ -146,6 +138,14 @@ export async function executeDeploy(
146138
await deploy.start();
147139
}
148140
} else {
141+
// instantiate source tracking
142+
// stl will decide, based on the org's properties, what needs to be done
143+
const stl = await SourceTracking.create({
144+
org,
145+
project,
146+
subscribeSDREvents: true,
147+
ignoreConflicts: opts['ignore-conflicts'],
148+
});
149149
componentSet = await buildComponentSet(opts, stl);
150150
if (componentSet.size === 0) {
151151
throw new SfError(

0 commit comments

Comments
 (0)