Skip to content

Commit 16c97f2

Browse files
authored
Merge pull request #7 from RobertLang/fix/profile-check
[FIX] Correct null point exception when using new configuration without yaml:profile
2 parents 8e6e155 + 4e1f6f4 commit 16c97f2

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
// Version defines the version of the application. This variable will be overridden by build system
@@ -75,7 +76,7 @@ func main() {
7576

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

0 commit comments

Comments
 (0)