aboutsummaryrefslogtreecommitdiff
path: root/internal/commands/update.go
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-10-25 09:56:14 +0000
committerFuwn <[email protected]>2024-10-25 10:12:22 +0000
commit4b64fdd0cd1709b8b4ce3a0aff50f2e1e8f30fbb (patch)
tree65a3d5c4ad125dfde8981d0f9ab97815bcae7aaf /internal/commands/update.go
parentfix(source): dynamically identify host (diff)
downloadyae-4b64fdd0cd1709b8b4ce3a0aff50f2e1e8f30fbb.tar.xz
yae-4b64fdd0cd1709b8b4ce3a0aff50f2e1e8f30fbb.zip
feat(yae): add optional schema field
Diffstat (limited to 'internal/commands/update.go')
-rw-r--r--internal/commands/update.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/commands/update.go b/internal/commands/update.go
index fa7e09f..5889d3a 100644
--- a/internal/commands/update.go
+++ b/internal/commands/update.go
@@ -28,14 +28,14 @@ func UpdateFlags() []cli.Flag {
}
}
-func Update(sources *yae.Sources) func(c *cli.Context) error {
+func Update(sources *yae.Environment) func(c *cli.Context) error {
return func(c *cli.Context) error {
updates := []string{}
force := c.Bool("force-hashed")
forcePinned := c.Bool("force-pinned")
if c.Args().Len() == 0 {
- for name, source := range *sources {
+ for name, source := range sources.Sources {
if updated, err := source.Update(sources, name, force, forcePinned); err != nil {
return err
} else if updated {
@@ -44,7 +44,7 @@ func Update(sources *yae.Sources) func(c *cli.Context) error {
}
} else {
name := c.Args().Get(0)
- source := (*sources)[name]
+ source := (*sources).Sources[name]
if updated, err := source.Update(sources, name, force, forcePinned); err != nil {
return err