gokrazy / tools

this repository contains the gok CLI tool of gokrazy

Home Page:https://gokrazy.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Segmentation violation with gok --update_all

jung-kurt opened this issue · comments

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.

Thanks for the report! This should now be fixed