about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2026-06-20 11:06:23 +0100
committerArun Isaac2026-06-20 11:06:23 +0100
commit852f76758daeaf67a988ecbb8daa17310d053010 (patch)
treee336fa2958fc794c584c4bceb87908bb45b7c8cc
parentac0715673488be9dbc1cdc131198a78b4556e6ee (diff)
downloadccwl-852f76758daeaf67a988ecbb8daa17310d053010.tar.gz
ccwl-852f76758daeaf67a988ecbb8daa17310d053010.tar.lz
ccwl-852f76758daeaf67a988ecbb8daa17310d053010.zip
scripts: Report non-existent source files gracefully.
-rwxr-xr-xscripts/ccwl4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/ccwl b/scripts/ccwl
index 3f8ab9b..cc7728f 100755
--- a/scripts/ccwl
+++ b/scripts/ccwl
@@ -73,6 +73,10 @@ exec guile --no-auto-compile -e main -s "$0" "$@"
   ;; our purposes. Besides, compiling would fail since the workflow
   ;; macro cannot access command definitions.
   (set! %load-should-auto-compile #f)
+  (unless (file-exists? source)
+    (raise-exception
+     (formatted-message "File ~a does not exist"
+                        source)))
   ((case to
      ((cwl) function->cwl)
      ((dot) function->dot))