From d2b2fd3d6d9ffac5378334f0bfc811119b3faa0b Mon Sep 17 00:00:00 2001 From: liyu Date: Tue, 10 Dec 2024 12:27:09 +0800 Subject: [PATCH] correct tarball path compare --- .../indy/pkg/npm/content/PackageMetadataGenerator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java b/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java index 6a9fb93cbb..e40b3731f2 100644 --- a/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java +++ b/addons/pkg-npm/common/src/main/java/org/commonjava/indy/pkg/npm/content/PackageMetadataGenerator.java @@ -321,10 +321,9 @@ private boolean writePackageMetadata( List firstLevelFiles, Artif } // Generate tarball url if missing - String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname - - if ( versionMetadata.getDist() == null || !versionMetadata.getDist().getTarball().equals(tarball) ) + if ( versionMetadata.getDist() == null || !versionMetadata.getDist().getTarball().endsWith(packagePath.getTarPath()) ) { + String tarball = "http://indy/" + packagePath.getTarPath(); // here we use mock host. indy will amend it with the right hostname //logger.debug( "Generate dist tarball: {}", tarball ); versionMetadata.setDist( new Dist( tarball ) ); }