File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -318,7 +318,9 @@ func setDepsPC(ctx *context, pkg *packages.Package) {
318
318
}
319
319
320
320
if len (pcDir ) > 0 {
321
- pcDir = append (pcDir , os .Getenv ("PKG_CONFIG_PATH" ))
321
+ if pkgPath , ok := os .LookupEnv ("PKG_CONFIG_PATH" ); ok {
322
+ pcDir = append (pcDir , pkgPath )
323
+ }
322
324
os .Setenv ("PKG_CONFIG_PATH" , strings .Join (pcDir , ":" ))
323
325
}
324
326
}
Original file line number Diff line number Diff line change @@ -6,14 +6,14 @@ import (
6
6
"os/exec"
7
7
)
8
8
9
- func AppendPCPath (path string ) string {
9
+ func appendPCPath (path string ) string {
10
10
if env , ok := os .LookupEnv ("PKG_CONFIG_PATH" ); ok {
11
11
return path + ":" + env
12
12
}
13
13
return path
14
14
}
15
15
16
16
func SetPath (cmd * exec.Cmd , path string ) {
17
- pcPath := fmt .Sprintf ("PKG_CONFIG_PATH=%s" , AppendPCPath (path ))
17
+ pcPath := fmt .Sprintf ("PKG_CONFIG_PATH=%s" , appendPCPath (path ))
18
18
cmd .Env = append (os .Environ (), pcPath )
19
19
}
You can’t perform that action at this time.
0 commit comments