Skip to content

Commit eb47c54

Browse files
authored
Merge pull request #1101 from xushiwei/q
xtool/cppkg: InstallPkg allows to customize cacheDir
2 parents bba7494 + c858f79 commit eb47c54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

xtool/cppkg/cppkg.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ const (
2929
// pkgAndVer: 7bitcoder/[email protected]
3030
func Install(pkgAndVer string, flags int) {
3131
pkgPath, ver := parsePkgVer(pkgAndVer)
32-
_, _, err := InstallPkg(pkgPath, ver, nil, flags)
32+
_, _, err := InstallPkg("", pkgPath, ver, nil, flags)
3333
check(err)
3434
}
3535

3636
// InstallPkg installs a package with the given package path and version.
37-
func InstallPkg(pkgPath, ver string, options []string, flags int) (pkg *Package, buildDir string, err error) {
38-
m, err := New("")
37+
func InstallPkg(cacheDir, pkgPath, ver string, options []string, flags int) (pkg *Package, buildDir string, err error) {
38+
m, err := New(cacheDir)
3939
if err != nil {
4040
return
4141
}

0 commit comments

Comments
 (0)