From a3304d6b4a8f42f812f196083bed0bf1195deb69 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Tue, 22 Apr 2025 22:36:39 +0100 Subject: command-line-tool: Stage secondary files too. * ravanan/command-line-tool.scm (build-command-line-tool-script): Stage secondary files too. --- ravanan/command-line-tool.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ravanan/command-line-tool.scm b/ravanan/command-line-tool.scm index edcaaab..1933051 100644 --- a/ravanan/command-line-tool.scm +++ b/ravanan/command-line-tool.scm @@ -982,8 +982,15 @@ directory of the workflow." ;; Stage file as entry-name and return the staged File value. (rename-file (assoc-ref* file "path") entry-name) - (canonicalize-file-value `(("class" . "File") - ("path" . ,entry-name)))) + (canonicalize-file-value + (maybe-assoc-set `(("class" . "File") + ("path" . ,entry-name)) + (cons "secondaryFiles" + (maybe-let* ((secondary-files + (maybe-assoc-ref (just file) "secondaryFiles"))) + (just (vector-map (lambda (file) + (stage-file file (assoc-ref* file "basename"))) + secondary-files))))))) ;; Stage files. ;; We currently support File and Dirent only. TODO: Support others. @@ -1001,7 +1008,6 @@ directory of the workflow." ;; Symlink to the file. ((eq? (object-type entry) 'File) - ;; TODO: Stage secondary files too? (cons entry (stage-file entry entry-name)))))) entries)) -- cgit v1.2.3