aboutsummaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorFuwn <[email protected]>2025-11-24 21:42:43 -0800
committerFuwn <[email protected]>2025-11-24 22:04:05 -0800
commit8f47a3261e4053e4e0943ca0ab5566eb36d02ceb (patch)
tree803b7f1712c87ccc019d696a8daa71547abba528 /internal
parent567ba5e85e0b267e975eba0dc2a1b482e1968d94 (diff)
downloadyae-8f47a3261e4053e4e0943ca0ab5566eb36d02ceb.tar.xz
yae-8f47a3261e4053e4e0943ca0ab5566eb36d02ceb.zip
feat(add): Add error message for invalid URL template strings
Diffstat (limited to 'internal')
-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)