Skip to content

Commit

Permalink
Merge pull request #7 from RobertLang/fix/profile-check
Browse files Browse the repository at this point in the history
[FIX] Correct null point exception when using new configuration without yaml:profile
  • Loading branch information
cmuench authored Jan 5, 2021
2 parents 8e6e155 + 4e1f6f4 commit 16c97f2
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"
)

// Version defines the version of the application. This variable will be overridden by build system
Expand Down Expand Up @@ -75,7 +76,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 16c97f2

Please sign in to comment.