Skip to content

Commit

Permalink
Fix wrong usage of conditional expression in ParseConfigWithOption fu…
Browse files Browse the repository at this point in the history
…nction.

Fixes #5.

Signed-off-by: Aliwoto <[email protected]>
  • Loading branch information
Aliwoto committed Nov 5, 2022
1 parent 7c37075 commit 12c019b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ssg/strongParser/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func ParseConfig(value any, filename string) error {
func ParseConfigWithOption(value any, filename string, opt *ConfigParserOptions) error {
p, err := Parse(filename)
if err != nil {
if opt == nil && !opt.ReadEnv {
if opt == nil || !opt.ReadEnv {
return err
}

Expand Down

0 comments on commit 12c019b

Please sign in to comment.