Packager is now builder (#958)
This commit is contained in:
@@ -15,13 +15,13 @@ type Process struct {
|
||||
}
|
||||
|
||||
func (p *Process) Exec(exe *process.Executable) error {
|
||||
cmd := exec.Command(exe.Binary.Path)
|
||||
cmd := exec.Command(exe.Package.Path)
|
||||
return cmd.Run()
|
||||
}
|
||||
|
||||
func (p *Process) Fork(exe *process.Executable) (*process.PID, error) {
|
||||
// create command
|
||||
cmd := exec.Command(exe.Binary.Path, exe.Args...)
|
||||
cmd := exec.Command(exe.Package.Path, exe.Args...)
|
||||
// set env vars
|
||||
cmd.Env = append(cmd.Env, exe.Env...)
|
||||
|
||||
|
@@ -4,7 +4,7 @@ package process
|
||||
import (
|
||||
"io"
|
||||
|
||||
"github.com/micro/go-micro/runtime/package"
|
||||
"github.com/micro/go-micro/runtime/build"
|
||||
)
|
||||
|
||||
// Process manages a running process
|
||||
@@ -20,8 +20,8 @@ type Process interface {
|
||||
}
|
||||
|
||||
type Executable struct {
|
||||
// The executable binary
|
||||
Binary *packager.Binary
|
||||
// Package containing executable
|
||||
Package *build.Package
|
||||
// The env variables
|
||||
Env []string
|
||||
// Args to pass
|
||||
|
Reference in New Issue
Block a user