fix windows compilation error

This commit is contained in:
Asim Aslam 2019-11-21 11:19:52 +00:00
parent 11d81221cc
commit 212144d658

View File

@ -6,7 +6,6 @@ import (
"os" "os"
"os/exec" "os/exec"
"strconv" "strconv"
"syscall"
"github.com/micro/go-micro/runtime/process" "github.com/micro/go-micro/runtime/process"
) )
@ -15,13 +14,13 @@ type Process struct {
} }
func (p *Process) Exec(exe *process.Executable) error { func (p *Process) Exec(exe *process.Executable) error {
cmd := exec.Command(exe.Binary.Path) cmd := exec.Command(exe.Package.Path)
return cmd.Run() return cmd.Run()
} }
func (p *Process) Fork(exe *process.Executable) (*process.PID, error) { func (p *Process) Fork(exe *process.Executable) (*process.PID, error) {
// create command // create command
cmd := exec.Command(exe.Binary.Path, exe.Args...) cmd := exec.Command(exe.Package.Path, exe.Args...)
// set env vars // set env vars
cmd.Env = append(cmd.Env, exe.Env...) cmd.Env = append(cmd.Env, exe.Env...)