about summary refs log tree commit diff
diff options
context:
space:
mode:
authorArun Isaac2024-08-22 16:52:47 +0100
committerArun Isaac2024-08-22 16:52:47 +0100
commit434eaaee542610d68613451ba95ec9d86816eabd (patch)
tree215d56a2226694d6cc8a7dc916bab60702badf1f
parentca704ea1e6af7710effc34be55add8e55f77ae5d (diff)
downloadravanan-434eaaee542610d68613451ba95ec9d86816eabd.tar.gz
ravanan-434eaaee542610d68613451ba95ec9d86816eabd.tar.lz
ravanan-434eaaee542610d68613451ba95ec9d86816eabd.zip
reader: Read files in other directories correctly.
* ravanan/reader.scm (read-workflow, read-inputs): Read the basename of the full
file path.
-rw-r--r--ravanan/reader.scm6
1 files changed, 3 insertions, 3 deletions
diff --git a/ravanan/reader.scm b/ravanan/reader.scm
index 6618867..1e3505c 100644
--- a/ravanan/reader.scm
+++ b/ravanan/reader.scm
@@ -203,7 +203,7 @@ each association list of the returned vector of association lists. If
   (call-with-current-directory (dirname workflow-file)
     ;; TODO: Implement $import directive.
     (cut normalize-workflow
-         (preprocess-include (read-yaml-file workflow-file)))))
+         (preprocess-include (read-yaml-file (basename workflow-file))))))
 
 (define (read-inputs inputs-file)
   "Read @var{inputs-file} resolving file paths if any."
@@ -229,6 +229,6 @@ each association list of the returned vector of association lists. If
            ;; ambiguities.
            (if (string=? (file-name-extension inputs-file)
                          ".json")
-               (call-with-input-file inputs-file
+               (call-with-input-file (basename inputs-file)
                  json->scm)
-               (read-yaml-file inputs-file))))))
+               (read-yaml-file (basename inputs-file)))))))