diff options
| author | eltrac <hi@eltr.ac> | 2026-09-11 21:54:29 +0800 |
|---|---|---|
| committer | eltrac <hi@eltr.ac> | 2026-09-11 21:54:29 +0800 |
| commit | 65bc31943f28528cb46f2ee2ba7999b78474b936 (patch) | |
| tree | e6301fc3df526c8069173efeabc97d7d0b8c1751 /src | |
| parent | 4ad02f3f57b195f806147e044a932842f724ea51 (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.clj | 6 |
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) |
