We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6a45323 commit e5371d6Copy full SHA for e5371d6
lib/rsx.risor
@@ -2,6 +2,16 @@ import os
2
import regexp
3
import exec
4
5
+func log(msg) {
6
+ print(msg)
7
+}
8
+
9
+func debug(msg) {
10
+ if os.getenv("RSX_DEBUG") == "1" {
11
+ print('DEBUG: {msg}')
12
+ }
13
14
15
func shell(command) {
16
cmd := exec.command(["bash", "-c", command])
17
buf := buffer()
@@ -14,23 +24,14 @@ func shell(command) {
24
}, func() { err = true })
25
26
if err {
27
+ debug(string(buf))
28
error('error {string(buf)}')
18
29
}
19
30
20
31
return string(buf)
21
32
22
33
func sh(command) { return shell(command) }
23
34
-func log(msg) {
- print(msg)
-}
-
-func debug(msg) {
- if os.getenv("RSX_DEBUG") == "1" {
- }
35
func env(key, def) {
36
v := os.getenv(key)
37
if v == "" {
0 commit comments