Skip to content

Commit

Permalink
fix: isPath check
Browse files Browse the repository at this point in the history
  • Loading branch information
alexluong committed Jul 29, 2024
1 parent 59d5bdc commit 55622a6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/listen/listen.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@ func Listen(URL *url.URL, sourceQuery string, connectionFilterString string, fla
return errors.New("Can only set a CLI path when listening to a single source")
}

_, err = isPath(flags.CliPath)
flagIsPath, err := isPath(flags.CliPath)
if err != nil {
return err
}
if !flagIsPath {
return errors.New("The CLI path must be in a valid format")
}
}
Expand Down

2 comments on commit 55622a6

@leggetter
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexluong does this resolve #94 ?

@alexluong
Copy link
Collaborator Author

@alexluong alexluong commented on 55622a6 Jul 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexluong does this resolve #94 ?

Yeah, sort of. It negates #94. As it is right now, isPath already returns false for paths without leading slash, so we don't need #94 anymore.

Please sign in to comment.