aboutsummaryrefslogtreecommitdiff
path: root/doc/capture-stdout.scm
diff options
context:
space:
mode:
authorArun Isaac2023-10-15 12:13:58 +0100
committerArun Isaac2023-10-15 12:41:39 +0100
commitcb66af826596b7bfba0fa45f8eb25fcf1613bc13 (patch)
tree15631d090f37869319f3f30bd875a3af6f1a7237 /doc/capture-stdout.scm
parent3063c33634d4a25ba99a2c884dd8bf04e519f914 (diff)
downloadccwl-cb66af826596b7bfba0fa45f8eb25fcf1613bc13.tar.gz
ccwl-cb66af826596b7bfba0fa45f8eb25fcf1613bc13.tar.lz
ccwl-cb66af826596b7bfba0fa45f8eb25fcf1613bc13.zip
ccwl: Make #:stderr and #:stdout first class parameters.
#:stderr and #:stdout, especially #:stdout, are commonly required. They ought to be first class parameters and not tucked away into #:other. * ccwl/ccwl.scm (<command>)[stderr, stdout]: New fields. * ccwl/ccwl.scm (command): Accept #:stderr and #:stdout as first class parameters. * ccwl/cwl.scm (command->cwl-scm): Serialize stderr and stdout fields. * doc/capture-stdout.scm (print), doc/decompress-compile-run.scm (run), doc/checksum.scm (md5sum, sha1sum, sha256sum), doc/spell-check.scm (find-misspellings): Capture stdout in file. * doc/checksum.scm, doc/decompress-compile-run.scm: * doc/ccwl.skb (Tutorial)[Capturing the standard output stream of a command]: Document #:stdout first class parameter. * doc/ccwl.skb (Tutorial)[Workflow with multiple steps]: Capture stdout in explicitly named files. * tests/ccwl.scm ("commands with non-string #:stderr parameters must raise a &ccwl-violation condition", "commands with non-string #:stdout parameters must raise a &ccwl-violation condition"): New tests.
Diffstat (limited to 'doc/capture-stdout.scm')
-rw-r--r--doc/capture-stdout.scm3
1 files changed, 2 insertions, 1 deletions
diff --git a/doc/capture-stdout.scm b/doc/capture-stdout.scm
index b9b6774..9eb19ca 100644
--- a/doc/capture-stdout.scm
+++ b/doc/capture-stdout.scm
@@ -1,7 +1,8 @@
(define print
(command #:inputs (message #:type string)
#:run "echo" message
- #:outputs (printed-message #:type stdout)))
+ #:outputs (printed-message #:type stdout)
+ #:stdout "printed-message-output.txt"))
(workflow ((message #:type string))
(print #:message message))