Skip to content

Commit

Permalink
🐛 Remove slash from java bundle for windows (#745) (#750)
Browse files Browse the repository at this point in the history
relies on konveyor/java-analyzer-bundle#115

Signed-off-by: Emily McMullan <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>

Signed-off-by: Emily McMullan <[email protected]>
Signed-off-by: Cherry Picker <[email protected]>
Co-authored-by: Emily McMullan <[email protected]>
  • Loading branch information
konveyor-ci-bot[bot] and eemcmullan authored Dec 12, 2024
1 parent e064665 commit 4772079
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"os"
"os/exec"
"path/filepath"
"runtime"
"strconv"
"strings"

Expand Down Expand Up @@ -198,6 +199,11 @@ func (p *javaServiceClient) getURI(refURI string) (string, uri.URI, error) {
jarPath = filepath.Join(filepath.Dir(u.Path), jarName)
}

// these are added in bundle
if runtime.GOOS == "windows" {
jarPath = strings.TrimPrefix(jarPath, "\\")
}

path := filepath.Join(strings.Split(strings.TrimSuffix(packageName, ".class"), ".")...) // path: org/apache/logging/log4j/core/appender/FileManager

javaFileName := fmt.Sprintf("%s.java", filepath.Base(path))
Expand Down

0 comments on commit 4772079

Please sign in to comment.