diff options
| author | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-04-20 16:54:08 +0200 |
|---|---|---|
| committer | Nathan Reiner <nathan@nathanreiner.xyz> | 2026-04-20 16:54:08 +0200 |
| commit | b7b167284e72aba699a73a1ab9c8a197d7297db2 (patch) | |
| tree | 9ee4190328ff0a8e92b0d4743368cd8e2c895d34 /src | |
| parent | 3c3031e9b4bc69d7b8c1ea9dc50defa80a79aba6 (diff) | |
add error message on missing template files
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/builder.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/lib/builder.lua b/src/lib/builder.lua index 34c3c8c..adb55c8 100644 --- a/src/lib/builder.lua +++ b/src/lib/builder.lua @@ -77,6 +77,10 @@ function Builder:build(args) end function Builder:process_file(file) + if not (self.source_directory / file.path):exists() then + error(tostring(file.path) .. ' does not exist.') + end + local f = (self.source_directory / file.path):open("r") local raw = f:read("*all") f:close() |