Skip to content

Commit

Permalink
[FIX] Correct null point exception when using new configuration witho…
Browse files Browse the repository at this point in the history
…ut yaml:profile
  • Loading branch information
RobertLang committed Jan 5, 2021
1 parent 22cdcd4 commit 4e1f6f4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions inotify-proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 4e1f6f4

Please sign in to comment.