ed

[hare] The standard editor
Log | Files | Refs | README | LICENSE

commit effb6ef4458ee0a0dc605d5e620232990ae0859a
parent 268caaf4f6fb51ec368d1985e390585c1cf42f71
Author: Byron Torres <b@torresjrjr.com>
Date:   Mon,  8 Jan 2024 20:16:03 +0000

cmd_shellescape(): propagate os::exec::error

Diffstat:
Mcommand.ha | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/command.ha b/command.ha @@ -654,13 +654,13 @@ fn cmd_shellescape(s: *Session, cmd: *Command) (void | Error) = { let shcmdline = memio::string(&new)!; - let shcmd = exec::cmd("sh", "-c", shcmdline)!; + let shcmd = exec::cmd("sh", "-c", shcmdline)?; let pipe = exec::pipe(); exec::addfile(&shcmd, os::stdout_file, pipe.1); - let proc = exec::start(&shcmd)!; + let proc = exec::start(&shcmd)?; io::close(pipe.1)!; - exec::wait(&proc)!; + exec::wait(&proc)?; if (preview) fmt::println(shcmdline)!;