aboutsummaryrefslogtreecommitdiff
path: root/internal/commands
diff options
context:
space:
mode:
Diffstat (limited to 'internal/commands')
-rw-r--r--internal/commands/add.go2
-rw-r--r--internal/commands/drop.go2
-rw-r--r--internal/commands/init.go2
-rw-r--r--internal/commands/update.go6
4 files changed, 6 insertions, 6 deletions
diff --git a/internal/commands/add.go b/internal/commands/add.go
index 1b32533..07bee28 100644
--- a/internal/commands/add.go
+++ b/internal/commands/add.go
@@ -50,7 +50,7 @@ func AddFlags() []cli.Flag {
}
}
-func Add(sources *yae.Sources) func(c *cli.Context) error {
+func Add(sources *yae.Environment) func(c *cli.Context) error {
return func(c *cli.Context) error {
if c.Args().Len() != 2 {
return fmt.Errorf("invalid number of arguments")
diff --git a/internal/commands/drop.go b/internal/commands/drop.go
index f30afb6..788b62b 100644
--- a/internal/commands/drop.go
+++ b/internal/commands/drop.go
@@ -7,7 +7,7 @@ import (
"github.com/urfave/cli/v2"
)
-func Drop(sources *yae.Sources) func(c *cli.Context) error {
+func Drop(sources *yae.Environment) func(c *cli.Context) error {
return func(c *cli.Context) error {
if c.Args().Len() == 0 {
return fmt.Errorf("invalid number of arguments")
diff --git a/internal/commands/init.go b/internal/commands/init.go
index 4d41553..c4bc138 100644
--- a/internal/commands/init.go
+++ b/internal/commands/init.go
@@ -8,7 +8,7 @@ import (
"github.com/urfave/cli/v2"
)
-func Init(sources *yae.Sources) func(c *cli.Context) error {
+func Init(sources *yae.Environment) func(c *cli.Context) error {
return func(c *cli.Context) error {
if _, err := os.Stat(c.String("sources")); err == nil {
return fmt.Errorf("sources file already exists")
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