diff --git a/flag.go b/flag.go index 125c6ce..49682f2 100644 --- a/flag.go +++ b/flag.go @@ -434,8 +434,10 @@ func flagFromEnvOrFile(envVars []string, filePath string) (val string, ok bool) } } for _, fileVar := range strings.Split(filePath, ",") { - if data, err := ioutil.ReadFile(fileVar); err == nil { - return string(data), true + if fileVar != "" { + if data, err := ioutil.ReadFile(fileVar); err == nil { + return string(data), true + } } } return "", false