What is not working as expected?
The bug relates to an issue raised in fluxcd/flux2#4961
This gist of the issue is when $HOME or $XDC_CONFIG_HOME are unset, dir/path panics when initialising
|
func init() { |
|
loadUserPath() |
|
} |
|
|
|
// loadUserPath function defines UserConfigDir and UserLibexecDir. |
|
func loadUserPath() { |
|
// set user config |
|
userDir, err := userConfigDir() |
|
if err != nil { |
|
panic(err) |
|
} |
|
UserConfigDir = filepath.Join(userDir, notation) |
|
|
|
// set user libexec |
|
UserLibexecDir = UserConfigDir |
|
} |
What did you expect to happen?
I would expect notation to not panic, breaking any application importing the notation SDK when $HOME and $XDC_CONFIG_HOME are unset.
How can we reproduce it?
Sets can be found in the reference issue
Describe your environment
OS: Arch Linux, Debian Bookworm
Golang: 1.22.5
What is the version of your notation-go Library?
v1.1.0
What is not working as expected?
The bug relates to an issue raised in fluxcd/flux2#4961
This gist of the issue is when $HOME or $XDC_CONFIG_HOME are unset,
dir/pathpanics when initialisingnotation-go/dir/path.go
Lines 82 to 97 in 974c291
What did you expect to happen?
I would expect notation to not panic, breaking any application importing the notation SDK when $HOME and $XDC_CONFIG_HOME are unset.
How can we reproduce it?
Sets can be found in the reference issue
Describe your environment
OS: Arch Linux, Debian Bookworm
Golang: 1.22.5
What is the version of your notation-go Library?
v1.1.0