The embedded license file being pulled and read. Changing the path separator to a forward slash when pulling the licenses.json and walking the details directory resolves this issue (works on my machine..)
How to reproduce it (as minimally and precisely as possible):
Running a bare minimal generate example on a Windows machine (e.g. go run main.go generate . or bom generate .)
What happened:
When trying to read embedded license data (embedded in the
pkg\license\download.go
file), the calls to fs.ReadFile fail on (presumably) Windows machines because filepath.join will join the path using backslashes which ReadFile doesn't seem to like ("The path separator is a forward slash even on Windows systems"). https://github.com/kubernetes-sigs/bom/blob/0952c9f51b97474062cec39d5399feb9d9778dd8/pkg/license/download.go#L196C1-L205C121What you expected to happen:
The embedded license file being pulled and read. Changing the path separator to a forward slash when pulling the licenses.json and walking the details directory resolves this issue (works on my machine..)
How to reproduce it (as minimally and precisely as possible):
Running a bare minimal generate example on a Windows machine (e.g.
go run main.go generate .
orbom generate .
)Anything else we need to know?:
See https://github.com/golang/go/issues/45230? I have minimal go knowledge.
Environment:
cat /etc/os-release
): Windowsuname -a
):