fix: improved offline support
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Closes coop-cloud/organising#471.
This commit is contained in:
@ -17,19 +17,20 @@ var recipeFetchCommand = cli.Command{
|
||||
Description: "Fetchs all recipes without arguments.",
|
||||
Flags: []cli.Flag{
|
||||
internal.DebugFlag,
|
||||
internal.OfflineFlag,
|
||||
},
|
||||
Before: internal.SubCommandBefore,
|
||||
BashComplete: autocomplete.RecipeNameComplete,
|
||||
Action: func(c *cli.Context) error {
|
||||
conf := runtime.New(runtime.WithOffline(internal.Offline))
|
||||
recipeName := c.Args().First()
|
||||
conf := runtime.New()
|
||||
|
||||
if recipeName != "" {
|
||||
internal.ValidateRecipe(c)
|
||||
internal.ValidateRecipe(c, conf)
|
||||
return nil // ValidateRecipe ensures latest checkout
|
||||
}
|
||||
|
||||
repos, err := recipe.ReadReposMetadata()
|
||||
repos, err := recipe.ReadReposMetadata(conf)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user