aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-01-14 11:04:49 +0100
committerDmitry Vyukov <dvyukov@google.com>2016-01-14 11:04:49 +0100
commit12f3129e71d07c151dcb6e674ec925acf531a9b0 (patch)
tree4f745b89b680663f591832c3b8e7d4779da12ba9
parentb217dcb509f133976933640563ff5c41bc97fc0b (diff)
vm/local: implement debug mode
-rw-r--r--vm/local/local.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/vm/local/local.go b/vm/local/local.go
index d81541a06..08a72a39f 100644
--- a/vm/local/local.go
+++ b/vm/local/local.go
@@ -69,6 +69,10 @@ func (inst *instance) Run(timeout time.Duration, command string) (<-chan []byte,
}
args := strings.Split(command, " ")
cmd := exec.Command(args[0], args[1:]...)
+ if inst.cfg.Debug {
+ cmd.Stdout = os.Stdout
+ cmd.Stderr = os.Stdout
+ }
if err := cmd.Start(); err != nil {
return nil, nil, err
}