mirror of https://github.com/nealey/spongy
Pass along inherited environemnt variables
This commit is contained in:
parent
cfe75df50f
commit
e9ccb68622
|
@ -191,14 +191,13 @@ func (nw *Network) messageDispatchLoop() {
|
||||||
|
|
||||||
handlerPath := path.Join(nw.basePath, "handler")
|
handlerPath := path.Join(nw.basePath, "handler")
|
||||||
cmd := exec.Command(handlerPath, m.Args...)
|
cmd := exec.Command(handlerPath, m.Args...)
|
||||||
cmd.Env = []string{
|
cmd.Env = os.Environ()
|
||||||
"command=" + m.Command,
|
cmd.Env = append(cmd.Env, "command=" + m.Command)
|
||||||
"fullsender=" + m.FullSender,
|
cmd.Env = append(cmd.Env, "fullsender=" + m.FullSender)
|
||||||
"sender=" + m.Sender,
|
cmd.Env = append(cmd.Env, "sender=" + m.Sender)
|
||||||
"forum=" + m.Forum,
|
cmd.Env = append(cmd.Env, "forum=" + m.Forum)
|
||||||
"text=" + m.Text,
|
cmd.Env = append(cmd.Env, "text=" + m.Text)
|
||||||
"raw=" + line,
|
cmd.Env = append(cmd.Env, "raw=" + line)
|
||||||
}
|
|
||||||
cmd.Stderr = os.Stderr
|
cmd.Stderr = os.Stderr
|
||||||
out, err := cmd.Output()
|
out, err := cmd.Output()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -104,4 +104,5 @@ func main() {
|
||||||
runsvdir(basePath)
|
runsvdir(basePath)
|
||||||
|
|
||||||
running = false
|
running = false
|
||||||
|
log.Print("Exiting for some reason!")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue