Add a build package (#1926)

* Add a build package

* fix go mod

* package tar
This commit is contained in:
Asim Aslam
2020-08-11 16:51:58 +01:00
committed by GitHub
parent e162e6d505
commit fae4151027
13 changed files with 298 additions and 74 deletions

View File

@@ -13,13 +13,13 @@ import (
"github.com/micro/go-micro/v3/runtime/local/process"
)
func (p *Process) Exec(exe *process.Executable) error {
func (p *Process) Exec(exe *process.Binary) error {
cmd := exec.Command(exe.Package.Path)
cmd.Dir = exe.Dir
return cmd.Run()
}
func (p *Process) Fork(exe *process.Executable) (*process.PID, error) {
func (p *Process) Fork(exe *process.Binary) (*process.PID, error) {
// create command
cmd := exec.Command(exe.Package.Path, exe.Args...)