aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlex Brainman <alex.brainman@gmail.com>2011-05-28 21:26:03 +1000
committerAlex Brainman <alex.brainman@gmail.com>2011-05-28 21:26:03 +1000
commitb7582852f63fd8bedba53ab415c1b3cc5ac2ae9c (patch)
treefddb815c96666bd6dee3c6c2c90256a6580608bb /src
parentf369fc09f41bcb9b7bfdfbc21332abe98f89059e (diff)
downloadgo-b7582852f63fd8bedba53ab415c1b3cc5ac2ae9c.tar.xz
gotest, pkg/exec: use bash instead of sh to execute shell scripts on windows
As suggested by dho, iant2. R=golang-dev, rsc CC=devon.odell, golang-dev, iant https://golang.org/cl/4515147
Diffstat (limited to 'src')
-rw-r--r--src/cmd/gotest/gotest.go4
-rw-r--r--src/pkg/exec/exec_test.go8
2 files changed, 6 insertions, 6 deletions
diff --git a/src/cmd/gotest/gotest.go b/src/cmd/gotest/gotest.go
index 8c81baf976..4cb3da23c8 100644
--- a/src/cmd/gotest/gotest.go
+++ b/src/cmd/gotest/gotest.go
@@ -285,8 +285,8 @@ func doRun(argv []string, returnStdout bool) string {
}
cmd += `"` + v + `"`
}
- command = "sh"
- argv = []string{"sh", "-c", cmd}
+ command = "bash"
+ argv = []string{"bash", "-c", cmd}
}
var err os.Error
argv[0], err = exec.LookPath(argv[0])
diff --git a/src/pkg/exec/exec_test.go b/src/pkg/exec/exec_test.go
index eb8cd5fec9..362b41c013 100644
--- a/src/pkg/exec/exec_test.go
+++ b/src/pkg/exec/exec_test.go
@@ -39,7 +39,7 @@ func TestRunCat(t *testing.T) {
}
func TestRunEcho(t *testing.T) {
- cmd, err := run([]string{"sh", "-c", "echo hello world"},
+ cmd, err := run([]string{"bash", "-c", "echo hello world"},
DevNull, Pipe, DevNull)
if err != nil {
t.Fatal("run:", err)
@@ -57,7 +57,7 @@ func TestRunEcho(t *testing.T) {
}
func TestStderr(t *testing.T) {
- cmd, err := run([]string{"sh", "-c", "echo hello world 1>&2"},
+ cmd, err := run([]string{"bash", "-c", "echo hello world 1>&2"},
DevNull, DevNull, Pipe)
if err != nil {
t.Fatal("run:", err)
@@ -75,7 +75,7 @@ func TestStderr(t *testing.T) {
}
func TestMergeWithStdout(t *testing.T) {
- cmd, err := run([]string{"sh", "-c", "echo hello world 1>&2"},
+ cmd, err := run([]string{"bash", "-c", "echo hello world 1>&2"},
DevNull, Pipe, MergeWithStdout)
if err != nil {
t.Fatal("run:", err)
@@ -97,7 +97,7 @@ func TestAddEnvVar(t *testing.T) {
if err != nil {
t.Fatal("setenv:", err)
}
- cmd, err := run([]string{"sh", "-c", "echo $NEWVAR"},
+ cmd, err := run([]string{"bash", "-c", "echo $NEWVAR"},
DevNull, Pipe, DevNull)
if err != nil {
t.Fatal("run:", err)