Abort when MinIO bucket does not have versioning enabled #545 (#546)

Co-authored-by: Florent FAYOLLE <florent.fayolle@beta.gouv.fr>
This commit is contained in:
Florent
2023-07-10 12:24:55 +02:00
committed by GitHub
parent a56b0448ff
commit b6b2d05be0
7 changed files with 69 additions and 39 deletions

View File

@@ -1,4 +1,4 @@
import { checkMinIOExternalStorage,
import { checkMinIOBucket, checkMinIOExternalStorage,
configureMinIOExternalStorage } from 'app/server/lib/configureMinIOExternalStorage';
import { makeSimpleCreator } from 'app/server/lib/ICreate';
import { Telemetry } from 'app/server/lib/Telemetry';
@@ -12,6 +12,7 @@ export const create = makeSimpleCreator({
{
name: 'minio',
check: () => checkMinIOExternalStorage() !== undefined,
checkBackend: () => checkMinIOBucket(),
create: configureMinIOExternalStorage,
},
],

View File

@@ -117,5 +117,7 @@ export async function main() {
}
if (require.main === module) {
main().catch((err) => console.error(err));
main().catch((err) => {
console.error(err);
});
}