Skip to content

Commit 4e1f6f4

Browse files
committed
[FIX] Correct null point exception when using new configuration without yaml:profile
1 parent 22cdcd4 commit 4e1f6f4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

inotify-proxy.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@ package main
22

33
import (
44
"flag"
5+
"os"
6+
"strings"
7+
58
"github.com/cmuench/inotify-proxy/internal/config"
69
"github.com/cmuench/inotify-proxy/internal/util"
710
"github.com/cmuench/inotify-proxy/internal/watcher"
811
"github.com/gookit/color"
9-
"os"
10-
"strings"
1112
)
1213

1314
var Version = "dev"
@@ -74,7 +75,7 @@ func main() {
7475

7576
for _, e := range c.Entries {
7677
color.Style{color.FgCyan, color.OpBold}.Printf("Directory: %s\n", e.Directory)
77-
if *e.Profile != "" {
78+
if e.Profile != nil {
7879
color.Style{color.FgCyan, color.OpBold}.Printf("Profile: %s\n", *e.Profile)
7980
}
8081
if len(e.Extensions) > 0 {

0 commit comments

Comments
 (0)