fix(gonf): fixed hostflag management

This commit is contained in:
Julien Dessaux 2024-06-01 23:57:00 +02:00
parent 0459fac5d3
commit efbfb291ae
Signed by: adyxax
GPG key ID: F92E51B86E07177E

View file

@ -13,8 +13,8 @@ func addHostFlag(f *flag.FlagSet) *string {
}
func hostFlagToHostDir(f *flag.FlagSet, hostFlag *string) (string, error) {
if hostFlag == nil {
return "", errors.New("required -host FLAG is missing")
if *hostFlag == "" {
}
hostDir := filepath.Join(configDir, "hosts", *hostFlag)
if info, err := os.Stat(hostDir); err != nil {