about summary refs log tree commit diff
path: root/scripts
diff options
context:
space:
mode:
authorArun Isaac2025-12-02 00:46:15 +0000
committerArun Isaac2025-12-02 01:01:21 +0000
commitceb555dd124dc18e2dad747b9afb2987cdbb91db (patch)
tree3f7f39b27f83086e57f4d8ec1bda8c6f4f475da0 /scripts
parent9a7283b249abd5fec085b50fe1dd15fa3cfd045f (diff)
downloadccwl-ceb555dd124dc18e2dad747b9afb2987cdbb91db.tar.gz
ccwl-ceb555dd124dc18e2dad747b9afb2987cdbb91db.tar.lz
ccwl-ceb555dd124dc18e2dad747b9afb2987cdbb91db.zip
scripts: Only guard load function for ccwl-violation.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/ccwl30
1 files changed, 15 insertions, 15 deletions
diff --git a/scripts/ccwl b/scripts/ccwl
index 05f4f7a..e68501f 100755
--- a/scripts/ccwl
+++ b/scripts/ccwl
@@ -77,21 +77,21 @@ exec guile --no-auto-compile -e main -s "$0" "$@"
   ((case to
      ((cwl) function->cwl)
      ((dot) function->dot))
-   (guard (exception
-           ;; Handle syntax violation exceptions by reporting them and
-           ;; exiting.
-           ((ccwl-violation? exception)
-            (report-ccwl-violation exception)
-            (exit #f)))
-     (let ((result (load (canonicalize-path source)
-                         read-syntax)))
-       (if (or (command? result)
-               (js-expression? result)
-               (workflow? result))
-           result
-           (raise-exception
-            (condition (formatted-message "Last expression in file ~a returns none of workflow, command or js-expression"
-                                          source))))))
+   (let ((result (guard (exception
+                         ;; Handle syntax violation exceptions by
+                         ;; reporting them and exiting.
+                         ((ccwl-violation? exception)
+                          (report-ccwl-violation exception)
+                          (exit #f)))
+                   (load (canonicalize-path source)
+                         read-syntax))))
+     (if (or (command? result)
+             (js-expression? result)
+             (workflow? result))
+         result
+         (raise-exception
+          (condition (formatted-message "Last expression in file ~a returns none of workflow, command or js-expression"
+                                        source)))))
    (current-output-port)))
 
 (define (main args)