aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-11-25 05:42:43 +0000
committerFuwn <[email protected]>2025-11-25 06:04:05 +0000
commitc7e12455ba57e07fd1435d9183a294d818dac895 (patch)
tree803b7f1712c87ccc019d696a8daa71547abba528
parentfeat(utilities): Error check executable path (diff)
downloadyae-c7e12455ba57e07fd1435d9183a294d818dac895.tar.xz
yae-c7e12455ba57e07fd1435d9183a294d818dac895.zip
feat(add): Add error message for invalid URL template strings
-rw-r--r--internal/commands/add.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/commands/add.go b/internal/commands/add.go
index 07bee28..951f119 100644
--- a/internal/commands/add.go
+++ b/internal/commands/add.go
@@ -72,6 +72,8 @@ func Add(sources *yae.Environment) func(c *cli.Context) error {
if strings.Contains(source.URLTemplate, "{version}") {
source.URL = strings.ReplaceAll(source.URLTemplate, "{version}", source.Version)
+ } else {
+ return fmt.Errorf("version template must contain {version}")
}
} else {
source.URL = c.Args().Get(1)