-
Notifications
You must be signed in to change notification settings - Fork 46
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
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
Lines 82 to 97 in 974c291
| 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working
Type
Projects
Status
Done