Skip to content

Commit

Permalink
fix(cmd): correct unix:// prefix check
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Grasso <[email protected]>
  • Loading branch information
leogr authored and poiana committed Jan 26, 2021
1 parent 4577e13 commit a9c2175
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/falco-exporter/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func main() {
config.UnixSocketPath = ""
log.Printf("connecting to gRPC server at %s:%d (timeout %s)", config.Hostname, config.Port, timeout)
} else {
if !strings.HasPrefix("unix://", config.UnixSocketPath) {
if !strings.HasPrefix(config.UnixSocketPath, "unix://") {
config.UnixSocketPath = "unix://" + config.UnixSocketPath
}
log.Printf("connecting to gRPC server at %s (timeout %s)", config.UnixSocketPath, timeout)
Expand Down

0 comments on commit a9c2175

Please sign in to comment.