Remove all at path to make way for new symlink

This commit is contained in:
peter-evans 2018-10-11 09:28:55 +09:00
parent 03db09e95f
commit 5695ebc3d5
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ func extractFile(dest string, hdr *tar.Header, tr io.Reader) error {
// Check if something already exists at path
// If so, delete it
if FilepathExists(path) {
if err := os.Remove(path); err != nil {
if err := os.RemoveAll(path); err != nil {
return errors.Wrapf(err, "error removing %s to make way for new symlink", hdr.Name)
}
}