Skip to content

Commit

Permalink
Fix the issue that the error message is confused when the patched tar…
Browse files Browse the repository at this point in the history
… is not correct (#1175)
  • Loading branch information
lucklove authored Mar 3, 2021
1 parent fa61d0a commit dcb107f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/cluster/manager/patch.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,10 @@ func checkPackage(bindVersion spec.BindVersion, specManager *spec.SpecManager, n
}
cacheDir := specManager.Path(name, "cache", comp+"-"+checksum[:7])
if err := os.MkdirAll(cacheDir, 0755); err != nil {
return err
return errors.Annotatef(err, "create cache directory %s", cacheDir)
}
if err := exec.Command("tar", "-xvf", packagePath, "-C", cacheDir).Run(); err != nil {
return err
return errors.Annotatef(err, "decompress %s", packagePath)
}

fi, err := os.Stat(path.Join(cacheDir, entry))
Expand Down

0 comments on commit dcb107f

Please sign in to comment.