Skip to content

Commit 92c5b2e

Browse files
kardolusZander Mackie
andcommitted
Set the PIP_CERT environment variable in the staging container
[#156283238] Co-authored-by: Zander Mackie <[email protected]>
1 parent 415f3c7 commit 92c5b2e

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/python/supply/supply.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,12 @@ import (
88
"io/ioutil"
99
"os"
1010
"path/filepath"
11-
"github.com/cloudfoundry/python-buildpack/src/python/conda"
12-
"github.com/cloudfoundry/python-buildpack/src/python/pipfile"
1311
"regexp"
1412
"strings"
1513

14+
"github.com/cloudfoundry/python-buildpack/src/python/conda"
15+
"github.com/cloudfoundry/python-buildpack/src/python/pipfile"
16+
1617
"os/exec"
1718

1819
"github.com/cloudfoundry/libbuildpack"
@@ -582,6 +583,9 @@ func (s *Supplier) UninstallUnusedDependencies() error {
582583

583584
func (s *Supplier) RunPip() error {
584585
s.Log.BeginStep("Running Pip Install")
586+
if os.Getenv("PIP_CERT") == "" {
587+
os.Setenv("PIP_CERT", "/etc/ssl/certs/ca-certificates.crt")
588+
}
585589

586590
requirementsPath := filepath.Join(s.Stager.BuildDir(), "requirements.txt")
587591
if exists, err := libbuildpack.FileExists(requirementsPath); err != nil {

0 commit comments

Comments
 (0)