Skip to content

Commit e0520be

Browse files
committed
Bump rsx lib
1 parent b0d668f commit e0520be

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/rsx.risor

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,16 @@ import exec
44

55
func shell(command) {
66
cmd := exec.command(["bash", "-c", command])
7-
return string(cmd.combined_output())
7+
buf := buffer()
8+
cmd.stderr = buf
9+
cmd.stdout = buf
10+
cmd.env = os.environ()
11+
err := false
12+
try(func() {
13+
cmd.run()
14+
}, func() { err = true })
15+
16+
return string(buf)
817
}
918

1019
func log(msg) {

0 commit comments

Comments
 (0)