From b2d5ccae34172a5f887f9740e7bef2ef6f51c942 Mon Sep 17 00:00:00 2001 From: MasterPtato <23087326+MasterPtato@users.noreply.github.com> Date: Tue, 27 Aug 2024 18:57:50 +0000 Subject: [PATCH] fix(bolt): validate hub regex in ns config (#1093) ## Changes --- lib/bolt/core/src/context/project.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/bolt/core/src/context/project.rs b/lib/bolt/core/src/context/project.rs index e228b36642..305e91e727 100644 --- a/lib/bolt/core/src/context/project.rs +++ b/lib/bolt/core/src/context/project.rs @@ -214,6 +214,13 @@ impl ProjectContextData { } } + // MARK: Api + if let Some(hub_origin_regex) = &self.ns().rivet.api.hub_origin_regex { + if let Err(err) = regex::Regex::new(&hub_origin_regex) { + panic!("invalid hub origin regex: {err}"); + } + } + // MARK: Backend if self.ns().rivet.backend.is_some() { assert!(