Skip to content

Commit

Permalink
syscall -> exec (for working on windows)
Browse files Browse the repository at this point in the history
  • Loading branch information
3846masa committed Jan 31, 2017
1 parent 675580b commit 276a9cd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"os/exec"
"os/user"
"strings"
"syscall"

"github.com/bfirsh/whalebrew/packages"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -73,6 +72,11 @@ var runCommand = &cobra.Command{
dockerArgs = append(dockerArgs, pkg.Image)
dockerArgs = append(dockerArgs, args[1:]...)

return syscall.Exec(dockerPath, dockerArgs, os.Environ())
dockerCmd := exec.Command(dockerPath, dockerArgs[1:]...)
dockerCmd.Env = os.Environ()
dockerCmd.Stdin = os.Stdin
dockerCmd.Stdout = os.Stdout
dockerCmd.Stderr = os.Stderr
return dockerCmd.Run()
},
}

0 comments on commit 276a9cd

Please sign in to comment.