@@ -74,7 +74,7 @@ export async function resolveApi(existingConfigAggregator?: ConfigAggregator): P
7474
7575export async function buildComponentSet ( opts : Partial < DeployOptions > , stl ?: SourceTracking ) : Promise < ComponentSet > {
7676 // if you specify nothing, you'll get the changes, like sfdx push, as long as there's an stl
77- if ( ! opts [ 'source-dir' ] && ! opts . manifest && ! opts . metadata && stl ) {
77+ if ( ! opts [ 'source-dir' ] && ! opts . manifest && ! opts . metadata && ! opts [ 'dry-run' ] && stl ) {
7878 /** localChangesAsComponentSet returned an array to support multiple sequential deploys.
7979 * `sf` chooses not to support this so we force one ComponentSet
8080 */
@@ -141,21 +141,16 @@ export async function executeDeploy(
141141 await deploy . start ( ) ;
142142 }
143143 } else {
144- let stl : SourceTracking | undefined ;
145- if ( ! opts [ 'dry-run' ] ) {
146- // if not dry-run, or with source-tracking enabling flags
147- // instantiate source tracking
148- // stl will decide, based on the org's properties, what needs to be done
149- stl = await SourceTracking . create ( {
150- org,
151- // mdapi format deploys don't require a project, but at this point we need one
152- project : project ?? ( await SfProject . resolve ( ) ) ,
153- subscribeSDREvents : true ,
154- ignoreConflicts : opts [ 'ignore-conflicts' ] ,
155- } ) ;
156- registry = stl . registry ;
157- }
158-
144+ // instantiate source tracking
145+ // stl will decide, based on the org's properties, what needs to be done
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 : true ,
151+ ignoreConflicts : opts [ 'ignore-conflicts' ] ,
152+ } ) ;
153+ registry = stl . registry ;
159154 componentSet = await buildComponentSet ( opts , stl ) ;
160155 if ( componentSet . size === 0 ) {
161156 if ( opts [ 'source-dir' ] ?? opts . manifest ?? opts . metadata ?? throwOnEmpty ) {
0 commit comments