mirror of
https://github.com/aptly-dev/aptly.git
synced 2026-10-15 10:07:24 +00:00
Ignore 'NoSuchBucket' error when deleting S3 objects
Also ignore any removal errors when `-force-drop` is used.
This commit is contained in:
1 parent
4b6c159e3a
commit
f104e53fd4
3 files changed
+30
-2
No files matched your search
+4
-1
@@ -1202,7 +1202,10 @@ func (collection *PublishedRepoCollection) Remove(publishedStorageProvider aptly
|
||||
|
||||
err = repo.RemoveFiles(publishedStorageProvider, removePrefix, removePoolComponents, progress)
|
||||
if err != nil {
|
||||
return err
|
||||
if !force {
|
||||
return fmt.Errorf("published files removal failed, use -force-drop to override: %s", err)
|
||||
}
|
||||
// ignore error with -force-drop
|
||||
}
|
||||
|
||||
collection.list[len(collection.list)-1], collection.list[repoPosition], collection.list =
|
||||
|
||||
Reference in new issue
Block a user