From 4e1f6f4da6fe37c337a83937ee97149e95ab2e6e Mon Sep 17 00:00:00 2001 From: Robert Lang Date: Tue, 5 Jan 2021 12:06:45 +0100 Subject: [PATCH] [FIX] Correct null point exception when using new configuration without yaml:profile --- inotify-proxy.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/inotify-proxy.go b/inotify-proxy.go index 560270a..80f84b3 100644 --- a/inotify-proxy.go +++ b/inotify-proxy.go @@ -2,12 +2,13 @@ package main import ( "flag" + "os" + "strings" + "github.com/cmuench/inotify-proxy/internal/config" "github.com/cmuench/inotify-proxy/internal/util" "github.com/cmuench/inotify-proxy/internal/watcher" "github.com/gookit/color" - "os" - "strings" ) var Version = "dev" @@ -74,7 +75,7 @@ func main() { for _, e := range c.Entries { color.Style{color.FgCyan, color.OpBold}.Printf("Directory: %s\n", e.Directory) - if *e.Profile != "" { + if e.Profile != nil { color.Style{color.FgCyan, color.OpBold}.Printf("Profile: %s\n", *e.Profile) } if len(e.Extensions) > 0 {