aboutsummaryrefslogtreecommitdiffstats
path: root/src/blogc.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/blogc.c')
-rw-r--r--src/blogc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/blogc.c b/src/blogc.c
index 2338c9e..329f4b1 100644
--- a/src/blogc.c
+++ b/src/blogc.c
@@ -219,13 +219,6 @@ main(int argc, char **argv)
goto cleanup2;
}
- sb_slist_t* l = blogc_template_parse_from_file(template, &err);
- if (err != NULL) {
- blogc_error_print(err);
- rv = 2;
- goto cleanup3;
- }
-
if (print != NULL) {
const char *val = sb_trie_lookup(config, print);
if (val == NULL) {
@@ -246,6 +239,13 @@ main(int argc, char **argv)
goto cleanup3;
}
+ sb_slist_t* l = blogc_template_parse_from_file(template, &err);
+ if (err != NULL) {
+ blogc_error_print(err);
+ rv = 2;
+ goto cleanup3;
+ }
+
char *out = blogc_render(l, s, config, listing);
bool write_to_stdout = (output == NULL || (0 == strcmp(output, "-")));