Skip to content

Commit d2b2fd3

Browse files
correct tarball path compare
1 parent e21e661 commit d2b2fd3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,9 @@ private boolean writePackageMetadata( List<StoreResource> firstLevelFiles, Artif
321321
}
322322

323323
// Generate tarball url if missing
324-
String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname
325-
326-
if ( versionMetadata.getDist() == null || !versionMetadata.getDist().getTarball().equals(tarball) )
324+
if ( versionMetadata.getDist() == null || !versionMetadata.getDist().getTarball().endsWith(packagePath.getTarPath()) )
327325
{
326+
String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname
328327
//logger.debug( "Generate dist tarball: {}", tarball );
329328
versionMetadata.setDist( new Dist( tarball ) );
330329
}

0 commit comments

Comments
 (0)