summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoreltrac <hi@eltr.ac>2026-09-11 21:54:29 +0800
committereltrac <hi@eltr.ac>2026-09-11 21:54:29 +0800
commit65bc31943f28528cb46f2ee2ba7999b78474b936 (patch)
treee6301fc3df526c8069173efeabc97d7d0b8c1751 /src
parent4ad02f3f57b195f806147e044a932842f724ea51 (diff)
fix #13
Instead of exit, it should create the data file. The previous approach cause issues when testing and building.
Diffstat (limited to 'src')
-rw-r--r--src/weepinbell/storage/edn_storage.clj6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/weepinbell/storage/edn_storage.clj b/src/weepinbell/storage/edn_storage.clj
index 1533e40..d4b23c2 100644
--- a/src/weepinbell/storage/edn_storage.clj
+++ b/src/weepinbell/storage/edn_storage.clj
@@ -85,11 +85,7 @@
;; make storage vtable
(defn use-store [datasource]
(when (not (file-exists? datasource))
- (timbre/error "Datasource is not found. File does not exist.")
- (System/exit 1))
- (when (not (ends-with? datasource ".edn"))
- (timbre/error "Datasource is not valid. It must be an .edn file.")
- (System/exit 1))
+ (spit datasource ""))
{:append (partial append-wm datasource)
:update (partial update-wm datasource)
:delete (partial delete-wm datasource)