diff --git a/internal/packer/packer.go b/internal/packer/packer.go index 6961719..6f3983c 100644 --- a/internal/packer/packer.go +++ b/internal/packer/packer.go @@ -92,6 +92,13 @@ func buildPackageMapFromFlags(cfg *config.Struct) map[string]bool { return buildPackages } +func buildPackagesFromFlags(cfg *config.Struct) []string { + var buildPackages []string + buildPackages = append(buildPackages, cfg.Packages...) + buildPackages = append(buildPackages, getGokrazySystemPackages(cfg)...) + return buildPackages +} + func findFlagFiles(cfg *config.Struct) (map[string][]string, error) { if len(cfg.PackageConfig) > 0 { contents := make(map[string][]string) @@ -625,7 +632,7 @@ func FindExtraFiles(cfg *config.Struct) (map[string][]*FileInfo, error) { // fall through to look for extra files in /_gokrazy/extrafiles } - buildPackages := getGokrazySystemPackages(cfg) + buildPackages := buildPackagesFromFlags(cfg) packageDirs, err := packer.PackageDirs(buildPackages) if err != nil { return nil, err