Skip to content

Commit

Permalink
fix(bolt): validate hub regex in ns config (#1093)
Browse files Browse the repository at this point in the history
<!-- Please make sure there is an issue that this PR is correlated to. -->

## Changes

<!-- If there are frontend changes, please include screenshots. -->
  • Loading branch information
MasterPtato committed Aug 27, 2024
1 parent 7014d1b commit b2d5cca
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/bolt/core/src/context/project.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down

0 comments on commit b2d5cca

Please sign in to comment.