Skip to content

Commit 6c84f27

Browse files
committed
Add target for validation only when no "availableInStores" specified
1 parent a5a921c commit 6c84f27

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

addons/promote/common/src/main/java/org/commonjava/indy/promote/validate/PromotionValidationTools.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,7 @@ public StoreKey[] getValidationStoreKeys( final ValidationRequest request, final
174174
verifyStoreKeys.add( request.getSourceRepository().getKey() );
175175
}
176176

177-
if ( includeTarget )
178-
{
179-
verifyStoreKeys.add( request.getTarget() );
180-
}
177+
181178
if ( verifyStores == null )
182179
{
183180
logger.warn(
@@ -202,6 +199,11 @@ public StoreKey[] getValidationStoreKeys( final ValidationRequest request, final
202199
}
203200
}
204201

202+
if ( verifyStoreKeys.isEmpty() )
203+
{
204+
verifyStoreKeys.add( request.getTarget() );
205+
}
206+
205207
logger.debug( "Using validation StoreKeys: {}", verifyStoreKeys );
206208

207209
return verifyStoreKeys.toArray( new StoreKey[0] );

0 commit comments

Comments
 (0)