Commit 0849e63b authored by NLR's avatar NLR

Make external commands extend the environment.

This lets user override `HTTP_PROXY` environment (for instance).
parent bd62278b
......@@ -67,10 +67,10 @@ func unpackFileFromZip(archivePath, encodedFilename string, headers http.Header,
}
catFile := exec.Command("gitlab-zip-cat")
catFile.Env = []string{
"ARCHIVE_PATH=" + archivePath,
"ENCODED_FILE_NAME=" + encodedFilename,
}
catFile.Env = append(os.Environ(),
"ARCHIVE_PATH="+archivePath,
"ENCODED_FILE_NAME="+encodedFilename,
)
catFile.Stderr = os.Stderr
catFile.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
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