Skip to content

Commit 40a4e1d

Browse files
committed
feat(utf8): ensure env vars are passed through to all commands
1 parent b7cea76 commit 40a4e1d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

client/service_manager.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,20 @@ func (s *ServiceManager) List() map[int]*exec.Cmd {
101101
// Command executes the command
102102
func (s *ServiceManager) Command() *exec.Cmd {
103103
cmd := exec.Command(s.Cmd, s.Args...)
104-
cmd.Env = s.Env
104+
env := os.Environ()
105+
env = append(env, s.Env...)
106+
cmd.Env = env
107+
105108
return cmd
106109
}
107110

108111
// Start a Service and log its output.
109112
func (s *ServiceManager) Start() *exec.Cmd {
110113
log.Println("[DEBUG] starting service")
111114
cmd := exec.Command(s.Cmd, s.Args...)
112-
cmd.Env = s.Env
115+
env := os.Environ()
116+
env = append(env, s.Env...)
117+
cmd.Env = env
113118

114119
cmdReader, err := cmd.StdoutPipe()
115120
if err != nil {

0 commit comments

Comments
 (0)