From 434eaaee542610d68613451ba95ec9d86816eabd Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Thu, 22 Aug 2024 16:52:47 +0100 Subject: reader: Read files in other directories correctly. * ravanan/reader.scm (read-workflow, read-inputs): Read the basename of the full file path. --- ravanan/reader.scm | 6 +++--- 1 file 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))))))) -- cgit v1.2.3