diff options
| author | Fuwn <[email protected]> | 2025-11-25 05:42:43 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-11-25 06:04:05 +0000 |
| commit | c7e12455ba57e07fd1435d9183a294d818dac895 (patch) | |
| tree | 803b7f1712c87ccc019d696a8daa71547abba528 | |
| parent | feat(utilities): Error check executable path (diff) | |
| download | yae-c7e12455ba57e07fd1435d9183a294d818dac895.tar.xz yae-c7e12455ba57e07fd1435d9183a294d818dac895.zip | |
feat(add): Add error message for invalid URL template strings
| -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) |