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, ...@@ -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