From 0be1fecb497773e40510dbed0c756951c62993e1 Mon Sep 17 00:00:00 2001 From: Bastian de Byl Date: Fri, 15 Jul 2022 11:10:54 -0400 Subject: [PATCH] dependabot-1 Build fixes for changes made by nonamedreturns --- cache/rebuilder.go | 2 +- cache/restorer.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/cache/rebuilder.go b/cache/rebuilder.go index d87589f0..e655bb9c 100644 --- a/cache/rebuilder.go +++ b/cache/rebuilder.go @@ -97,7 +97,7 @@ func (r rebuilder) Rebuild(srcs []string) error { // rebuild pushes the archived file to the cache. func (r rebuilder) rebuild(src, dst string) error { - src, err = filepath.Abs(filepath.Clean(src)) + src, err := filepath.Abs(filepath.Clean(src)) if err != nil { return fmt.Errorf("clean source path, %w", err) } diff --git a/cache/restorer.go b/cache/restorer.go index c68f3ef5..dc5ed709 100644 --- a/cache/restorer.go +++ b/cache/restorer.go @@ -78,6 +78,8 @@ func (r restorer) Restore(dsts []string) error { // restore fetches the archived file from the cache and restores to the host machine's file system. func (r restorer) restore(src, dst string) error { + var err error + pr, pw := io.Pipe() defer internal.CloseWithErrCapturef(&err, pr, "rebuild, pr close <%s>", dst)