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:
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user