Skip to content

Commit 8b45600

Browse files
authored
output docs improvement (#353)
1 parent 7ca6834 commit 8b45600

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

platform/Cmd.roc

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,16 @@ import Host
2020
Cmd := InternalCmd.Command
2121

2222
## Represents the output of a command.
23+
##
24+
## Output is a record:
25+
## ```
26+
## {
27+
## status : Result I32 InternalIOErr.IOErr,
28+
## stdout : List U8,
29+
## stderr : List U8,
30+
## }
31+
## ```
32+
##
2333
Output : InternalCmd.Output
2434

2535
## Create a new command to execute the given program in a child process.
@@ -99,16 +109,7 @@ clear_envs : Cmd -> Cmd
99109
clear_envs = |@Cmd(cmd)|
100110
@Cmd({ cmd & clear_envs: Bool.true })
101111

102-
## Execute command and capture stdout and stderr
103-
##
104-
## Output is a record:
105-
## ```
106-
## {
107-
## status : Result I32 InternalIOErr.IOErr,
108-
## stdout : List U8,
109-
## stderr : List U8,
110-
## }
111-
## ```
112+
## Execute command and capture stdout, stderr and the exit code in [Output].
112113
##
113114
## > Stdin is not inherited from the parent and any attempt by the child process
114115
## > to read from the stdin stream will result in the stream immediately closing.

0 commit comments

Comments
 (0)