From 0bffa6ddc8797a0aacd7b152a3cc3b2c04165879 Mon Sep 17 00:00:00 2001
From: David Cooper <david@dtcooper.com>
Date: Wed, 31 Jan 2024 14:57:55 -0500
Subject: [PATCH] Fixup

---
 src/pi-gen-config.ts | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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<void> {
   }
 
   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)')
   }