From b7ef4164724c6d2c3eb7907b25c6018413fa4a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20R=C3=BCger?= Date: Sun, 18 May 2025 22:06:37 +0200 Subject: [PATCH] Fix #594 --- util/cli.go | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/util/cli.go b/util/cli.go index 2eb61b9..84b3ed6 100644 --- a/util/cli.go +++ b/util/cli.go @@ -134,14 +134,16 @@ func processFile( return nil } - if meta.Space == "" { - fatalErrorHandler.Handle(nil, "space is not set ('Space' header is not set and '--space' option is not set)") - return nil - } + if meta != nil { + if meta.Space == "" { + fatalErrorHandler.Handle(nil, "space is not set ('Space' header is not set and '--space' option is not set)") + return nil + } - if meta.Title == "" { - fatalErrorHandler.Handle(nil, "page title is not set ('Title' header is not set and '--title-from-h1' option and 'h1_title' config is not set or there is no H1 in the file)") - return nil + if meta.Title == "" { + fatalErrorHandler.Handle(nil, "page title is not set ('Title' header is not set and '--title-from-h1' option and 'h1_title' config is not set or there is no H1 in the file)") + return nil + } } stdlib, err := stdlib.New(api)