You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by jp...@apache.org on 2022/06/03 08:25:01 UTC

[camel-k] 03/06: Fix #3257: fix uploading checksum files to the image registry on Windows

This is an automated email from the ASF dual-hosted git repository.

jpoth pushed a commit to branch release-1.9.x
in repository https://gitbox.apache.org/repos/asf/camel-k.git

commit 6e946b656642ad56066ac7b01bb09430ae7c25d1
Author: John Poth <po...@gmail.com>
AuthorDate: Wed May 18 11:50:47 2022 +0200

    Fix #3257: fix uploading checksum files to the image registry on Windows
    
    (cherry picked from commit 0ec183bbbff0347ff4bda18f7286f67e57fbc879)
---
 pkg/cmd/run.go | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/pkg/cmd/run.go b/pkg/cmd/run.go
index 2607be584..4f2235cfb 100644
--- a/pkg/cmd/run.go
+++ b/pkg/cmd/run.go
@@ -1053,6 +1053,15 @@ func uploadChecksumFile(hash hash.Hash, tmpDir string, ext string, path string,
 
 	filename := "maven_" + filepath.Base(path) + ext
 	filepath := filepath.Join(tmpDir, filename)
+	if runtimeos.GOOS == "windows" {
+		// workaround for https://github.com/container-tools/spectrum/issues/8
+		// work with relative paths instead
+		rel, err := getRelativeToWorkingDirectory(path)
+		if err != nil {
+			return err
+		}
+		filepath = rel
+	}
 
 	if err = writeChecksumToFile(filepath, hash); err != nil {
 		return err