summaryrefslogtreecommitdiffstats
path: root/main.scm
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2024-03-25 23:05:10 +0200
committerJan Tuomi <jans.tuomi@gmail.com>2024-03-26 21:25:10 +0200
commitd69143a4be9c79dec92984b844ce9213c79e69ab (patch)
tree58bb123e35e4d5a5943f474dcc8abd45bad22297 /main.scm
parentb15d0a9fe278a3db87b65e44459a5345151dfa86 (diff)
Add asserts for nonempty dir paths to make filesystem ops safer
Diffstat (limited to 'main.scm')
-rw-r--r--main.scm4
1 files changed, 4 insertions, 0 deletions
diff --git a/main.scm b/main.scm
index 4b594c4..6a94ee3 100644
--- a/main.scm
+++ b/main.scm
@@ -39,6 +39,10 @@
(define template-path (or (get-environment-variable "PANDOC_TEMPLATE")
"template.html"))
+(assert (> (string-length src-dir) 0))
+(assert (> (string-length out-dir) 0))
+(assert (> (string-length template-path) 0))
+
(define (process-path path)
(match path
[(? is-md?) (process-md path)]