From 062c1a101e4ad83957d049c95f3baab44ac3a84b Mon Sep 17 00:00:00 2001 From: joostdecock Date: Sun, 27 Apr 2025 14:50:28 +0200 Subject: [PATCH] fix: Allow dashes in plugin names --- scripts/add-software.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/add-software.mjs b/scripts/add-software.mjs index 039e8c90b4f..0e281fe63f2 100644 --- a/scripts/add-software.mjs +++ b/scripts/add-software.mjs @@ -4,6 +4,7 @@ import { path, globDir, copyFolderRecursively, + mkdir, rm, root, templateOut, @@ -185,8 +186,8 @@ function validatePluginName(name) { if (Object.keys(plugins).includes(pluginName.toLowerCase())) return `Sorry but ${pluginName} is already taken so you'll need to pick something else` - if (/^([a-z]+)$/.test(name)) return true - else return ' 🙈 Please use only [a-z], no spaces, no capitals, no nothing 🤷' + if (/^([a-z-]+)$/.test(name)) return true + else return ' 🙈 Please use only [a-z] or dash, no spaces, no capitals, no nothing 🤷' } async function createDesign(name, template) {