diff options
author | Ondřej Surý <ondrej@sury.org> | 2011-04-20 15:44:41 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2011-04-20 15:44:41 +0200 |
commit | 50104cc32a498f7517a51c8dc93106c51c7a54b4 (patch) | |
tree | 47af80be259cc7c45d0eaec7d42e61fa38c8e4fb /misc/dashboard/builder/exec.go | |
parent | c072558b90f1bbedc2022b0f30c8b1ac4712538e (diff) | |
download | golang-upstream/2011.03.07.1.tar.gz |
Imported Upstream version 2011.03.07.1upstream/2011.03.07.1
Diffstat (limited to 'misc/dashboard/builder/exec.go')
-rw-r--r-- | misc/dashboard/builder/exec.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/dashboard/builder/exec.go b/misc/dashboard/builder/exec.go index 6236c915a..53ea93ac5 100644 --- a/misc/dashboard/builder/exec.go +++ b/misc/dashboard/builder/exec.go @@ -1,15 +1,23 @@ +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package main import ( "bytes" "exec" "io" + "log" "os" "strings" ) // run is a simple wrapper for exec.Run/Close func run(envv []string, dir string, argv ...string) os.Error { + if *verbose { + log.Println("run", argv) + } bin, err := pathLookup(argv[0]) if err != nil { return err @@ -25,6 +33,9 @@ func run(envv []string, dir string, argv ...string) os.Error { // runLog runs a process and returns the combined stdout/stderr, // as well as writing it to logfile (if specified). func runLog(envv []string, logfile, dir string, argv ...string) (output string, exitStatus int, err os.Error) { + if *verbose { + log.Println("runLog", argv) + } bin, err := pathLookup(argv[0]) if err != nil { return |