Use os.RemoveAll to ignore path does not exist error (#3031)

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
This commit is contained in:
soharab-ic
2024-10-01 22:27:41 +05:30
committed by GitHub
parent 4b76ec9057
commit db2b0ad4a0
+1 -1
View File
@@ -293,7 +293,7 @@ func DeleteOldPackages(pkgPath, pkgType string) error {
if err != nil {
return err
}
err = os.Remove(file)
err = os.RemoveAll(file)
if err != nil {
return err
}