Packager is now builder (#958)

This commit is contained in:
Milos Gajdos
2019-11-19 16:09:43 +00:00
committed by Asim Aslam
parent 5744050943
commit 6a0082741c
7 changed files with 38 additions and 37 deletions

View File

@@ -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...)

View File

@@ -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