From ca30fa17d28e5c7ba9135d1203c33588f05af975 Mon Sep 17 00:00:00 2001 From: leovct Date: Fri, 29 Nov 2024 12:33:51 +0100 Subject: [PATCH] chore: nit --- .../git_package_content_provider/locators.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/locators.go b/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/locators.go index 56c9a03538..7ccb75355a 100644 --- a/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/locators.go +++ b/core/server/api_container/server/startosis_engine/startosis_packages/git_package_content_provider/locators.go @@ -20,8 +20,8 @@ func isLocalLocator(locator string) bool { } func shouldBlockAbsoluteLocatorBecauseIsInTheSameSourceModuleLocatorPackage(relativeOrAbsoluteLocator string, sourceModuleLocator string, rootPackageId string) bool { - isSourceModuleInRootPackage := strings.Contains(sourceModuleLocator, rootPackageId + "/") - isAbsoluteLocatorInRootPackage := strings.Contains(relativeOrAbsoluteLocator, rootPackageId + "/") + isSourceModuleInRootPackage := strings.HasPrefix(sourceModuleLocator, rootPackageId + "/") + isAbsoluteLocatorInRootPackage := strings.HasPrefix(relativeOrAbsoluteLocator, rootPackageId + "/") return isSourceModuleInRootPackage && isAbsoluteLocatorInRootPackage }