From 52f910af03028441bd833a0dd1a1feae5bdbecf0 Mon Sep 17 00:00:00 2001 From: John Herbener Date: Thu, 7 Dec 2023 19:32:17 -0500 Subject: [PATCH] Issue 333: Don't allow invalid project names --- lib/mix/tasks/install.ex | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/mix/tasks/install.ex b/lib/mix/tasks/install.ex index 772da950..7dc69f2c 100644 --- a/lib/mix/tasks/install.ex +++ b/lib/mix/tasks/install.ex @@ -30,6 +30,10 @@ defmodule Mix.Tasks.Beacon.Install do {options, _parsed} = OptionParser.parse!(argv, strict: @switches) + if Keyword.get(options, :site) |> String.starts_with?("beacon_") do + Mix.raise("site names starting with 'beacon_' are considered invalid, please choose another site name") + end + bindings = build_context_bindings(options) config_file_path = config_file_path("config.exs")