Skip to content

Commit

Permalink
feat(utf8): ensure env vars are passed through to all commands
Browse files Browse the repository at this point in the history
  • Loading branch information
mefellows committed Mar 20, 2018
1 parent b7cea76 commit 40a4e1d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/service_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,15 +101,20 @@ func (s *ServiceManager) List() map[int]*exec.Cmd {
// Command executes the command
func (s *ServiceManager) Command() *exec.Cmd {
cmd := exec.Command(s.Cmd, s.Args...)
cmd.Env = s.Env
env := os.Environ()
env = append(env, s.Env...)
cmd.Env = env

return cmd
}

// Start a Service and log its output.
func (s *ServiceManager) Start() *exec.Cmd {
log.Println("[DEBUG] starting service")
cmd := exec.Command(s.Cmd, s.Args...)
cmd.Env = s.Env
env := os.Environ()
env = append(env, s.Env...)
cmd.Env = env

cmdReader, err := cmd.StdoutPipe()
if err != nil {
Expand Down

0 comments on commit 40a4e1d

Please sign in to comment.