diff options
| author | Fuwn <[email protected]> | 2025-11-24 21:42:43 -0800 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-11-24 22:04:05 -0800 |
| commit | 8f47a3261e4053e4e0943ca0ab5566eb36d02ceb (patch) | |
| tree | 803b7f1712c87ccc019d696a8daa71547abba528 /internal | |
| parent | 567ba5e85e0b267e975eba0dc2a1b482e1968d94 (diff) | |
| download | yae-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.go | 2 |
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) |