summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--up.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/up.go b/up.go
index 53b94a3..d3f733a 100644
--- a/up.go
+++ b/up.go
@@ -22,6 +22,8 @@ import (
"context"
"fmt"
"io"
+ "io/ioutil"
+ "log"
"os"
"os/exec"
"sync"
@@ -68,6 +70,15 @@ func main() {
tui.PostEvent(tcell.NewEventInterrupt(nil))
})
+ log.SetOutput(ioutil.Discard)
+ if len(os.Args) > 1 && os.Args[1] == "--debug" {
+ debug, err := os.Create("up.debug")
+ if err != nil {
+ panic(err)
+ }
+ log.SetOutput(debug)
+ }
+
// Main loop
main_loop:
for {
@@ -413,6 +424,7 @@ func StartSubprocess(inputBuf *Buf, command string, signal func()) *Subprocess {
fmt.Fprintf(w, "up: %s", err)
return s
}
+ log.Println(cmd.Path)
go cmd.Wait()
return s
}