From 819251f2997343f62bc369837df457a81e5ee82b Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Jun 2025 10:52:34 +0200 Subject: [PATCH 1/2] when collecting libraries, convert them to absolute path --- bundle/libraries/upload.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bundle/libraries/upload.go b/bundle/libraries/upload.go index d38c7a5a04..a52c366c72 100644 --- a/bundle/libraries/upload.go +++ b/bundle/libraries/upload.go @@ -118,6 +118,10 @@ func collectLocalLibraries(b *bundle.Bundle) (map[string][]configLocation, error } } + // Need to convert relative path to absolute so that paths collected above match paths collected here + // artifacts.*.files[*].source are relative to bundle root, not sync root AFAIK + source = filepath.Join(b.BundleRootPath, source) + libs[source] = append(libs[source], configLocation{ configPath: p.Append(dyn.Key("remote_path")), location: v.Location(), From 574814965f89e2ae9defd61934f03b7a5e82667c Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Wed, 4 Jun 2025 11:11:08 +0200 Subject: [PATCH 2/2] only join is not abs already --- bundle/libraries/upload.go | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bundle/libraries/upload.go b/bundle/libraries/upload.go index a52c366c72..65fa1d2e71 100644 --- a/bundle/libraries/upload.go +++ b/bundle/libraries/upload.go @@ -73,7 +73,10 @@ func collectLocalLibraries(b *bundle.Bundle) (map[string][]configLocation, error return v, nil } - source = filepath.Join(b.SyncRootPath, source) + if !filepath.IsAbs(source) { + source = filepath.Join(b.SyncRootPath, source) + } + libs[source] = append(libs[source], configLocation{ configPath: p, location: v.Location(), @@ -120,7 +123,9 @@ func collectLocalLibraries(b *bundle.Bundle) (map[string][]configLocation, error // Need to convert relative path to absolute so that paths collected above match paths collected here // artifacts.*.files[*].source are relative to bundle root, not sync root AFAIK - source = filepath.Join(b.BundleRootPath, source) + if !filepath.IsAbs(source) { + source = filepath.Join(b.BundleRootPath, source) + } libs[source] = append(libs[source], configLocation{ configPath: p.Append(dyn.Key("remote_path")),