mirror of
https://github.com/Jguer/yay.git
synced 2024-11-06 09:07:21 +01:00
Merge pull request #1035 from Maryse47/master
Use BuildDir instead of cacheHome to store PKGBUILDS with -G
This commit is contained in:
commit
99d1df6f1d
@ -299,12 +299,12 @@ func getPkgbuildsfromABS(pkgs []string, path string) (bool, error) {
|
||||
|
||||
download := func(pkg string, url string) {
|
||||
defer wg.Done()
|
||||
if _, err := gitDownloadABS(url, cacheHome, pkg); err != nil {
|
||||
if _, err := gitDownloadABS(url, config.BuildDir, pkg); err != nil {
|
||||
errs.Add(fmt.Errorf("%s Failed to get pkgbuild: %s: %s", bold(red(arrow)), bold(cyan(pkg)), bold(red(err.Error()))))
|
||||
return
|
||||
}
|
||||
|
||||
_, stderr, err := capture(exec.Command("ln", "-s", filepath.Join(cacheHome, pkg, "trunk"), filepath.Join(path, pkg)))
|
||||
_, stderr, err := capture(exec.Command("ln", "-s", filepath.Join(config.BuildDir, pkg, "trunk"), filepath.Join(path, pkg)))
|
||||
mux.Lock()
|
||||
downloaded++
|
||||
if err != nil {
|
||||
@ -326,6 +326,6 @@ func getPkgbuildsfromABS(pkgs []string, path string) (bool, error) {
|
||||
}
|
||||
|
||||
wg.Wait()
|
||||
errs.Add(os.RemoveAll(filepath.Join(cacheHome, "packages")))
|
||||
errs.Add(os.RemoveAll(filepath.Join(config.BuildDir, "packages")))
|
||||
return len(missing) != 0, errs.Return()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user