mirror of
https://github.com/mudler/LocalAI.git
synced 2025-05-20 02:24:59 +00:00
fix: security scanner warning noise: error handlers part 1 (#2141)
first group of error handlers to reduce security scanner warning noise level Signed-off-by: Dave Lee <dave@gray101.com>
This commit is contained in:
parent
44bc540bb5
commit
2cd4936c99
7 changed files with 34 additions and 10 deletions
6
main.go
6
main.go
|
@ -43,7 +43,11 @@ func main() {
|
|||
for _, envFile := range envFiles {
|
||||
if _, err := os.Stat(envFile); err == nil {
|
||||
log.Info().Str("envFile", envFile).Msg("loading environment variables from file")
|
||||
godotenv.Load(envFile)
|
||||
err = godotenv.Load(envFile)
|
||||
if err != nil {
|
||||
log.Error().Err(err).Str("envFile", envFile).Msg("failed to load environment variables from file")
|
||||
continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue