diff --git a/src/pi-gen-config.ts b/src/pi-gen-config.ts index 552c145..62fb867 100644 --- a/src/pi-gen-config.ts +++ b/src/pi-gen-config.ts @@ -98,9 +98,10 @@ export async function validateConfig(config: PiGenConfig): Promise { } if ( - !/^[0-9]$/.test(config.compressionLevel) && - deployCompression === 'xz' && - config.compressionLevel !== '9e' + !( + /^[0-9]$/.test(config.compressionLevel) || + (deployCompression === 'xz' && config.compressionLevel === '9e') + ) ) { throw new Error('compression-level must be between 0 and 9 (or 9e for xz)') }