fix: improved offline support

Closes coop-cloud/organising#471.
This commit is contained in:
2023-07-26 08:16:07 +02:00
parent ab64eb2e8d
commit 3dc5662821
49 changed files with 455 additions and 375 deletions

View File

@ -5,6 +5,7 @@ import (
"coopcloud.tech/abra/pkg/autocomplete"
"coopcloud.tech/abra/pkg/formatter"
recipePkg "coopcloud.tech/abra/pkg/recipe"
"coopcloud.tech/abra/pkg/runtime"
"github.com/sirupsen/logrus"
"github.com/urfave/cli"
)
@ -16,13 +17,15 @@ var recipeVersionCommand = cli.Command{
ArgsUsage: "<recipe>",
Flags: []cli.Flag{
internal.DebugFlag,
internal.OfflineFlag,
},
Before: internal.SubCommandBefore,
BashComplete: autocomplete.RecipeNameComplete,
Action: func(c *cli.Context) error {
recipe := internal.ValidateRecipe(c)
conf := runtime.New(runtime.WithOffline(internal.Offline))
recipe := internal.ValidateRecipe(c, conf)
catalogue, err := recipePkg.ReadRecipeCatalogue()
catalogue, err := recipePkg.ReadRecipeCatalogue(conf)
if err != nil {
logrus.Fatal(err)
}