From 12c019b6be18179f7ec68a8543c612e0922f69a4 Mon Sep 17 00:00:00 2001 From: Aliwoto Date: Sun, 6 Nov 2022 02:09:21 +0330 Subject: [PATCH] Fix wrong usage of conditional expression in ParseConfigWithOption function. Fixes #5. Signed-off-by: Aliwoto --- ssg/strongParser/helpers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ssg/strongParser/helpers.go b/ssg/strongParser/helpers.go index eed3d54..ae7cc65 100644 --- a/ssg/strongParser/helpers.go +++ b/ssg/strongParser/helpers.go @@ -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 }