Skip to content

Commit 6c53c50

Browse files
committed
improve comments
1 parent 3212d27 commit 6c53c50

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

examples/command.roc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ print_output! = |cmd_output|
6161
Stderr.line!(err_data)
6262
6363
Err(err) ->
64-
Stderr.line!("Failed to start executing command: ${Inspect.to_str(err)}")
64+
Stderr.line!("Failed to get exit code for command, error: ${Inspect.to_str(err)}")
6565

6666

6767
# Run command with an environment variable

platform/Cmd.roc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,15 +130,15 @@ output! = |@Cmd(cmd)|
130130
Host.command_output!(cmd)
131131
|> InternalCmd.from_host_output
132132

133-
## Execute command and inherit stdin, stdout and stderr from parent
133+
## Execute command and inherit stdin, stdout and stderr from parent. Returns the exit code.
134134
##
135135
status! : Cmd => Result I32 [CmdStatusErr InternalIOErr.IOErr]
136136
status! = |@Cmd(cmd)|
137137
Host.command_status!(cmd)
138138
|> Result.map_err(InternalIOErr.handle_err)
139139
|> Result.map_err(CmdStatusErr)
140140

141-
## Execute command and inherit stdin, stdout and stderr from parent
141+
## Simplest way to execute a command while inheriting stdin, stdout and stderr from parent.
142142
##
143143
## ```
144144
## # Call echo to print "hello world"

0 commit comments

Comments
 (0)