gokrazy / tools

this repository contains the gok CLI tool of gokrazy
https://gokrazy.org
BSD 3-Clause "New" or "Revised" License
50 stars 28 forks source link

Segmentation violation with gok --update_all #43

Closed jung-kurt closed 1 year ago

jung-kurt commented 1 year ago

In order to avoid a nil pointer dereference when using gok get --update_all, I needed to add

if cfg.InternalCompatibilityFlags == nil {                                                                                                                                  
  cfg.InternalCompatibilityFlags = &config.InternalCompatibilityFlags{}                                                                                                     
}                                                                                                                                                                           

before InternalCompatibilityFlags is referenced in the function getGokrazySystemPackages() in file cmd/gok/cmd/get.go. This conforms with the guards in cmd/gok/cmd/update.go and cmd/gok/cmd/overwrite.go.

stapelberg commented 1 year ago

Thanks for the report! This should now be fixed