pass current environment down to the process
This commit is contained in:
+3
-2
@@ -7,7 +7,8 @@ import (
|
||||
"net/rpc"
|
||||
"os"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
cli "github.com/micro/cli/v2"
|
||||
|
||||
"github.com/owncloud/ocis/pkg/config"
|
||||
"github.com/owncloud/ocis/pkg/register"
|
||||
"github.com/refs/pman/pkg/process"
|
||||
@@ -39,7 +40,7 @@ func RunCommand(cfg *config.Config) *cli.Command {
|
||||
log.Fatal("dialing:", err)
|
||||
}
|
||||
|
||||
proc := process.NewProcEntry(os.Args[2], []string{os.Args[2]}...)
|
||||
proc := process.NewProcEntry(os.Args[2], os.Environ(), []string{os.Args[2]}...)
|
||||
var res int
|
||||
|
||||
if err := client.Call("Service.Start", proc, &res); err != nil {
|
||||
|
||||
@@ -4,9 +4,10 @@ import (
|
||||
"fmt"
|
||||
golog "log"
|
||||
"net/rpc"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/micro/cli/v2"
|
||||
cli "github.com/micro/cli/v2"
|
||||
|
||||
"github.com/micro/micro/v2/client/api"
|
||||
"github.com/micro/micro/v2/client/web"
|
||||
@@ -99,7 +100,7 @@ func (r *Runtime) Launch(services []string) {
|
||||
|
||||
OUT:
|
||||
for _, v := range services {
|
||||
args := process.NewProcEntry(v, []string{v}...)
|
||||
args := process.NewProcEntry(v, os.Environ(), []string{v}...)
|
||||
var reply int
|
||||
|
||||
if err := client.Call("Service.Start", args, &reply); err != nil {
|
||||
@@ -114,7 +115,7 @@ OUT:
|
||||
if len(services) >= len(Extensions) { // it will not run for ocis_simple builds.
|
||||
time.Sleep(2 * time.Second)
|
||||
for _, v := range dependants {
|
||||
args := process.NewProcEntry(v, []string{v}...)
|
||||
args := process.NewProcEntry(v, os.Environ(), []string{v}...)
|
||||
var reply int
|
||||
|
||||
if err := client.Call("Service.Start", args, &reply); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user