You've already forked pigallery2
mirror of
https://github.com/bpatrik/pigallery2.git
synced 2026-05-16 09:21:12 +02:00
Force exit when no supported image formats or JPG is not supported #1122
this is to know if docker build is failing on vips.
This commit is contained in:
@@ -445,7 +445,7 @@ export class ConfigDiagnostics {
|
||||
}
|
||||
|
||||
try {
|
||||
await ConfigDiagnostics.testAlbumsConfig(Config.Album, Config);
|
||||
ConfigDiagnostics.testAlbumsConfig(Config.Album, Config);
|
||||
} catch (ex) {
|
||||
const err: Error = ex;
|
||||
const errorText = 'Albums support error, switching off..' + ConfigDiagnostics.adjustConfigWarn;
|
||||
@@ -612,6 +612,17 @@ export class ConfigDiagnostics {
|
||||
|
||||
await this.removeUnsupportedPhotoExtensions(Config.Media.Photo);
|
||||
|
||||
if(Config.Media.Photo.supportedFormats.length === 0){
|
||||
Logger.error(LOG_TAG, 'No supported image formats found. Something is off. Exiting...');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
|
||||
if(Config.Media.Photo.supportedFormats.findIndex(v => v.toLowerCase() === 'jpg') === -1){
|
||||
Logger.error(LOG_TAG, 'JPG is not part of the supported image formats. Something is off. Exiting...');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user