Commit 26d2606f authored by Nick Thomas's avatar Nick Thomas

Merge branch 'append-environment' into 'master'

Make external commands calls extend the current process's environment.

See merge request gitlab-org/gitlab-workhorse!261
parents bd62278b 0849e63b
...@@ -67,10 +67,10 @@ func unpackFileFromZip(archivePath, encodedFilename string, headers http.Header, ...@@ -67,10 +67,10 @@ func unpackFileFromZip(archivePath, encodedFilename string, headers http.Header,
} }
catFile := exec.Command("gitlab-zip-cat") catFile := exec.Command("gitlab-zip-cat")
catFile.Env = []string{ catFile.Env = append(os.Environ(),
"ARCHIVE_PATH=" + archivePath, "ARCHIVE_PATH="+archivePath,
"ENCODED_FILE_NAME=" + encodedFilename, "ENCODED_FILE_NAME="+encodedFilename,
} )
catFile.Stderr = os.Stderr catFile.Stderr = os.Stderr
catFile.SysProcAttr = &syscall.SysProcAttr{Setpgid: true} catFile.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
stdout, err := catFile.StdoutPipe() stdout, err := catFile.StdoutPipe()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment