Skip to content
This repository has been archived by the owner on Aug 3, 2023. It is now read-only.

Commit

Permalink
Adds error message for site with non-trailing asterisk
Browse files Browse the repository at this point in the history
  • Loading branch information
EverlastingBugstopper committed Nov 4, 2019
1 parent 588deb2 commit 4491cc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/commands/publish/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ pub fn publish(
validate_worker_name(&target.name)?;

if let Some(site_config) = target.site.clone() {
if let Some(route) = &target.route {
if !route.ends_with("*") {
failure::bail!("The route in your wrangler.toml should have a trailing * to apply the Worker on every path, otherwise your site will not behave as expected.\nroute = {}*", route)
}
}
bind_static_site_contents(user, target, &site_config, false)?;
}

Expand Down

0 comments on commit 4491cc5

Please sign in to comment.